Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
水水就好/* POJ 3749 */ #include <iostream> #include <cstdio> #include <cstring> using namespace std; char str[100]; char cm[300]; int main() { while(scanf("%s",str) != EOF && strcmp(str,"ENDOFINPUT")) { getchar(); gets(cm); scanf("%s",str); int len = strlen(cm); for(int i=0; i<len; i++) { if(cm[i] >= 'A' && cm[i] <= 'Z') { int m = cm[i] - 'A' - 5; if(m < 0) { m += 26; } cm[i] = 'A' + m; } cout<<cm[i]; } cout<<endl; } return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator