2 solutions
-
-2
#include <bits/stdc++.h> using namespace std; const int N=210; char a[N]; char b[N]; int main() { cin.getline(a,N); int n=strlen(a); for(int i=0;i<n;i++) { if(a[i]=='z' || a[i]=='Z') { b[i]=char(int(a[i])-25); } else { if(('a'<=a[i] && a[i]<='z')||('A'<=a[i] && a[i]<='Z')) { b[i]=char(int(a[i])+1); } else b[i]=a[i]; } } cout<<b; return 0; }
Information
- ID
- 920
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 1
- Tags
- (None)
- # Submissions
- 62
- Accepted
- 26
- Uploaded By