Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
34475 yihang 【入门】凯撒密码 C++ 通过 0 MS 252 KB 245 2024-01-07 14:31:03

Tests(20/20):


#include "bits/stdc++.h" using namespace std; char s[55]; int main(){ int n; cin>>n; cin>>s; int t=strlen(s); for(int i=0;i<t;i++){ if(s[i]+n>'z'){ s[i]-=26; s[i]+=n;} else{ s[i]+=n;}} for(int i=0;i<t;i++)cout<<s[i]; }


测评信息: