Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
99352 | Kevin | 情报加密 | C++ | Accepted | 1 MS | 268 KB | 324 | 2024-11-26 15:15:41 |
#include<bits/stdc++.h> using namespace std; int main(){ char a[100]; gets(a); int len=strlen(a); for(int i=0;i<len;i++){ if((a[i]>='a'&&a[i]<='y')||(a[i]>='A'&&a[i]<='Y')){ cout<<char(a[i]+1); } else if(a[i]=='z'||a[i]=='Z'){ cout<<char(a[i]-25); } else cout<<a[i]; } return 0; }