結果
| 問題 | No.18 うーさー暗号 |
| コンテスト | |
| ユーザー |
Kurichan0806
|
| 提出日時 | 2017-11-01 15:55:32 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 486 bytes |
| コンパイル時間 | 699 ms |
| コンパイル使用メモリ | 77,224 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-07 06:39:24 |
| 合計ジャッジ時間 | 1,273 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 13 |
ソースコード
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <utility>
#include <iomanip>
using namespace std;
#define diff(x, y) ((x) > (y) ? ((x) - (y)) : ((y) - (x)))
int main(void) {
string str;
cin >> str;
vector <int> num(str.size());
for (int i = 0; i < str.size(); i++) {
num[i] = (int)str[i];
num[i] -= i + 1;
while (num[i] < 'A')
num[i] += 26;
}
for (int i = 0; i < num.size(); i++)
cout << (char)num[i];
cout << endl;
return 0;
}
Kurichan0806