結果
| 問題 | No.18 うーさー暗号 | 
| コンテスト | |
| ユーザー |  cocomoff | 
| 提出日時 | 2019-08-05 22:48:13 | 
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 5,000 ms | 
| コード長 | 295 bytes | 
| コンパイル時間 | 1,318 ms | 
| コンパイル使用メモリ | 158,668 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-07-18 13:49:29 | 
| 合計ジャッジ時間 | 2,167 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 13 | 
ソースコード
#include <bits/stdc++.h> 
using namespace std;
int main() {
    string S, oS;
    cin >> S;
    for (int i = 0; i < S.length(); i++) {
        int num = (int)(S[i] - 'A') - (i + 1);
        while (num < 0)
            num += 26;
        oS += (char)('A' + num);
    }
    cout << oS << endl;
}
            
            
            
        