Run ID Author Problem Lang Verdict Time Memory Code Length Submit Time
87059 sh25_zhuwy 凯撒密码 C++ Accepted 0 MS 256 KB 655 2026-04-10 15:50:04

Tests(2/2):


#include<bits/stdc++.h> using namespace std; int main() { string a; int x; getline(cin,a); cin>>x; int k=a.length(); for(int i=0;i<k;i++) { int n=a[i]; if (n>=65&&n<=90) { if (n+x>90) { a[i]=n+x-26; } else { a[i]=n+x; } } else if (n>=97&&n<=122) { if (n+x>122) { a[i]=n+x-26; } else { a[i]=n+x; } } cout<<a[i]; } return 0; }


Judgement Protocol: