結果

問題 No.1455 拡張ROTN
ユーザー MAHAYANAMAHAYANA
提出日時 2023-10-23 22:45:37
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 727 bytes
コンパイル時間 1,619 ms
コンパイル使用メモリ 168,820 KB
実行使用メモリ 7,908 KB
最終ジャッジ日時 2023-10-23 22:45:42
合計ジャッジ時間 5,722 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 TLE -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i,m,n) for(int i=m; i<n; ++i)
#define repl(i,m,n) for(ll i=m; i<n; ++i)

string shift(string &S){
    string res = "";
    for(char &c : S){
        if('a' <= c && c <= 'z'){
            if(c == 'z') res += 'a';
            else res += char(c + 'b' - 'a');
        }else if('A' <= c && c <= 'Z'){
            if(c == 'Z') res += 'A';
            else res += char(c + 'B' - 'A');
        }else{
            if(c == '9') res += "CpCzNkSuTbEoA";
            else res += char(c + '1' - '0');
        }
    }
    return res;
}

int main(){
    string S;
    int N;
    cin >> S >> N;
    rep(i, 0, N) S = shift(S);
    cout << S << endl;
    return 0;
}
0