結果
| 問題 | No.18 うーさー暗号 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-04-29 23:59:53 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 370 bytes |
| コンパイル時間 | 441 ms |
| コンパイル使用メモリ | 60,076 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-27 23:44:32 |
| 合計ジャッジ時間 | 1,026 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 13 |
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main() {
std::cin.tie(0);
std::ios::sync_with_stdio(false);
string A;
cin >> A;
for(int i=0;i<A.length();i++){
int d = (i + 1) % 26;
char c = (A[i] - d);
if(c < 'A'){
c = 'Z' - ('A' - c) + 1;
}
A[i] = c;
}
cout << A << endl;
return 0;
}