Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
34471 | 我要进前十(黄泽远) | 【入门】凯撒密码 | C++ | 通过 | 0 MS | 256 KB | 232 | 2024-01-07 14:23:10 |
#include "bits/stdc++.h" using namespace std; int main(){ int n; string s; cin>>n; cin>>s; for(int i=0;i<s.size();i++){ if(s[i]+n>'z'){ s[i]=s[i]-26+n; } else{ s[i]+=n; } } cout<<s; return 0; }