Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
40178 | Hyma | 密码翻译 | C++ | Accepted | 0 MS | 244 KB | 400 | 2024-02-07 22:05:14 |
#include<iostream> #include<cstring> using namespace std; int main() { char s1[85]; gets(s1); int a=strlen(s1); for(int i=0;i<a;i++){ int b=s1[i]; if('a'<=b&&b<'z'){ cout<<char(s1[i]+1); } else if(b=='z'){ cout<<"a"; } else if(b=='Z'){ cout<<"A"; } else if('A'<=b&&b<'Z'){ cout<<char(s1[i]+1); } else{ cout<<s1[i]; } } return 0; }