close
題目大意: 就右移。
思路: 阿就字元右移13。水題。
代碼:
#include <bits/stdc++.h>
#define Fast cin.tie(0), ios::sync_with_stdio(0)
#define louisfghbvc int t; cin >> t; while(t--)
using namespace std;
void solve(){
int n;
scanf("%d\n", &n);
while(n--){
string s;
getline(cin, s);
for(auto &c: s){
if(isupper(c)) c = ((c-'A')+13)%26 + 'A';
if(islower(c)) c = ((c-'a')+13)%26 + 'a';
}
cout << s << "\n";
}
}
int main()
{
//Fast;
//louisfghbvc
solve();
return 0;
}
/**
2
efGH ijKQ23
Uryyb Jbeyq!!
**/
文章標籤
全站熱搜