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!!
**/

arrow
arrow
    創作者介紹
    創作者 尾玉 的頭像
    尾玉

    louisfghbvc的部落格

    尾玉 發表在 痞客邦 留言(0) 人氣()