3号测试点错误!!80分!!
查看原帖
3号测试点错误!!80分!!
1078638
yang1812楼主2023/11/6 21:22
#include<bits/stdc++.h>
using namespace std;

int main(){
	int n;
	string s;
	cin>>n>>s;
	for(int i = 0;i < s.length();i++){
		if(s[i] + n <= 'z'){
			s[i] += n;
		}else{
			s[i] = s[i] + n % 26 - 26;
		}
	}
	cout<<s;
	return 0;
}
2023/11/6 21:22
加载中...