第四个测试点寄了,大佬们为啥
查看原帖
第四个测试点寄了,大佬们为啥
1068985
Hopoyage楼主2023/10/9 15:01
#include<iostream>
using namespace std;
int main(){
    int n,temp;
    string str;
    cin >> n;
    cin >> str;
    for(int i = 0;i < str.length();i++){
        temp = str[i]+n;
        if(temp > 122){
            temp = 97;
        }
        str[i] = (char)temp;
    }
    cout << str;
    return 0;
}
2023/10/9 15:01
加载中...