daishuohua @ 2024-08-30 13:35:34
又是我来求助了,样例过了,为什么40,dalao们快来帮帮忙,AC闭关
#include <bits/stdc++.h>
using namespace std;
string s;
int n;
int main(){
cin>>n>>s;
for(int i=0;i<s.size();i++){
if(s[i]>='a' && s[i]<='z'){
cout<<char((s[i]-96+n)%26+96);
}else if(s[i]>='A' && s[i]<='Z'){
cout<<char((s[i]-64+n)%26+64);
}
}
return 0;
}
在线等,很很很急!!!
by daishuohua @ 2024-08-30 13:48:33
@intqwe123 @Dark__dead 感谢大佬,AC了,已关
by Dark__dead @ 2024-08-30 13:49:33
@daishuohua 别关我,关我大号 @hyl_____
by daishuohua @ 2024-08-30 13:51:17
已关 @hyl_____