Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
89180 王馨桐 情报加密 C++ Accepted 1 MS 272 KB 369 2024-08-23 10:27:58

Tests(10/10):


Code:

#include<bits/stdc++.h> using namespace std; char s[81]; int main(){ cin.getline(s,81); int n=strlen(s); for(int i=0; i<=n; i++){ if(s[i]>=65&&s[i]<=90){ if(s[i]=='Z'){ s[i]='A'; }else{ s[i]+=1; } }else if(s[i]>=97&&s[i]<=122){ if(s[i]=='z'){ s[i]='a'; }else{ s[i]+=1; } } } cout <<s; return 0; }