結果
問題 |
No.18 うーさー暗号
|
ユーザー |
|
提出日時 | 2019-09-11 10:35:22 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 532 bytes |
コンパイル時間 | 597 ms |
コンパイル使用メモリ | 69,376 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-02 16:43:26 |
合計ジャッジ時間 | 1,378 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 13 |
ソースコード
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { string s; cin >> s; char carr[s.length() + 1]; s.copy(carr, s.length()); for (int i = 0; i < s.length(); i++) { int sub = i + 1 % 26; int c = carr[i] - sub; cout << c << endl; if (c < 65) { carr[i] = 90 - (64 - c); } else { carr[i] = c; } } carr[s.length()] = '\0'; cout << carr << endl; return 0; }