結果
問題 |
No.18 うーさー暗号
|
ユーザー |
![]() |
提出日時 | 2017-09-14 02:55:28 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 632 bytes |
コンパイル時間 | 1,374 ms |
コンパイル使用メモリ | 158,588 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-07 21:08:27 |
合計ジャッジ時間 | 1,997 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 5 WA * 8 |
ソースコード
#include <bits/stdc++.h> #define REP(i, n) for(int i = 0; i < (int)(n); ++i) #define FOR(i, m, n) for(int i = (m); i < (int)(n); ++i) #define ALL(x) (x).begin(), (x).end() #define INF 2000000000 #ifdef LOCAL #define eprintf(...) fprintf(stdout, __VA_ARGS__) #else #define eprintf(...) 0 #endif using namespace std; typedef long long LL; typedef unsigned long long ULL; typedef unsigned int uint; char dec(char c, int diff) { c += diff; while(c < 'A') { c += 'Z' - 'A' +1; } return c; } int main() { string s; cin >> s; REP(i, s.size()) { cout << dec(s[i], -(i+1)); } cout << endl; return 0; }