Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
99351 | Kevin | 加密的病历单 | C++ | Accepted | 1 MS | 264 KB | 409 | 2024-11-26 15:09:01 |
#include<bits/stdc++.h> using namespace std; char s[10001]; int main(){ int i,n,t; gets(s); n=strlen(s); for(i=0;i<n;i++){ if(s[i]>='a'&&s[i]<='z'){ t=s[i]; t+=3; if(t>122) t-=26; t-=32; s[i]=t; } else if(s[i]>='A'&&s[i]<='Z'){ t=s[i]; t+=3; if(t>90) t-=26; t+=32; s[i]=t; } } for(i=n-1;i>=0;i--){ cout<<s[i]; } return 0; }