题解 | 凯撒加密
凯撒加密
https://www.nowcoder.com/practice/006b7917d3784371a43cfbae01a9313d
#include <iostream> using namespace std; int main() { int n; string str; cin>>n; cin>>str; n = n%26; for(auto &c:str) { if((c+n)>'z') c='a'+c+n-'z'-1; else c=c+n; } cout<<str; } // 64 位输出请用 printf("%lld")