結果
問題 | No.18 うーさー暗号 |
ユーザー |
![]() |
提出日時 | 2019-12-05 10:25:38 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 286 bytes |
コンパイル時間 | 530 ms |
コンパイル使用メモリ | 65,528 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-17 13:26:40 |
合計ジャッジ時間 | 1,208 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 13 |
ソースコード
#include <iostream>using namespace std;int main(void) {cin.tie(0);ios::sync_with_stdio(false);string s;cin >> s;for (int i = 0; i < s.size(); ++i) {int n = (i + 1) % 26;if (s[i] - n >= 65) cout << char (s[i] - n);else cout << char (s[i] - n + 26);}return 0;}