結果
問題 | No.18 うーさー暗号 |
ユーザー |
![]() |
提出日時 | 2018-02-26 22:23:25 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 519 bytes |
コンパイル時間 | 776 ms |
コンパイル使用メモリ | 68,672 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-24 23:10:23 |
合計ジャッジ時間 | 1,413 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 13 |
ソースコード
// No.18 うーさー暗号 // https://yukicoder.me/problems/no/18 // #include <iostream> #include <sstream> using namespace std; string solve(string &S); int main() { string S; cin >> S; string ans = solve(S); cout << ans << endl; } string solve(string &S) { stringstream ss; char rot = 1; // ずらす文字数 for (char c: S) { c -= rot; if (c < 'A') c += 26; ss << c; rot++; rot %= 26; } return ss.str(); }