結果

問題 No.18 うーさー暗号
ユーザー wakimiko01000010
提出日時 2019-04-11 11:19:55
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 389 bytes
コンパイル時間 441 ms
コンパイル使用メモリ 66,212 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-18 08:47:49
合計ジャッジ時間 895 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <cstring>

using namespace std;

int main()
{
    char str[10010];
    
    cin >> str;
    
    for (int i = 0; i < strlen(str); i++) {
        for(int j = 0; j < (i+1); j++) {
            if (str[i] =='A') {
                str[i] = 'Z';
            }
            else {
                str[i]--;
            }
        }
    }
    
    cout << str << endl;
}
0