結果
問題 | No.18 うーさー暗号 |
ユーザー |
![]() |
提出日時 | 2017-09-14 02:58:15 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 636 bytes |
コンパイル時間 | 1,388 ms |
コンパイル使用メモリ | 158,048 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-07 06:36:22 |
合計ジャッジ時間 | 1,610 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 13 |
ソースコード
#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#endifusing namespace std;typedef long long LL;typedef unsigned long long ULL;typedef unsigned int uint;int dec(int 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 << (char)dec(s[i], -(i+1));}cout << endl;return 0;}