結果
問題 | No.18 うーさー暗号 |
ユーザー | ふう |
提出日時 | 2015-01-15 16:09:51 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 543 bytes |
コンパイル時間 | 682 ms |
コンパイル使用メモリ | 84,456 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-07 05:34:20 |
合計ジャッジ時間 | 1,149 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 13 |
ソースコード
#define _CRT_SECURE_NO_WARNINGS #define _USE_MATH_DEFINES #include <iostream> #include <map> #include <list> #include <cstdio> #include <cmath> #include <cstring> #include <string> #include <vector> #include <algorithm> #include <utility> #include <queue> #include <iomanip> #define INF 1050000000 using namespace std; string decode(string s) { for (int i = 0; i < s.length(); i++) { s[i] -= (i + 1) % 26; if (s[i] < 'A') { s[i] += 26; } } return (s); } int main(void) { string S; cin >> S; cout << decode(S) << endl; }