結果
| 問題 |
No.18 うーさー暗号
|
| コンテスト | |
| ユーザー |
dgd1724
|
| 提出日時 | 2016-09-07 18:31:09 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 495 bytes |
| コンパイル時間 | 550 ms |
| コンパイル使用メモリ | 67,108 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-15 21:05:11 |
| 合計ジャッジ時間 | 1,227 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 2 WA * 11 |
ソースコード
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <time.h>
#include <cstdlib>
#include <cmath>
#include <fstream>
int main(void) {
//test用
//std::ifstream in("test.txt");
//std::cin.rdbuf(in.rdbuf());
std::string str;
std::cin >> str;
for (int i = 0; i < str.length(); i++) {
int temp = str[i] - (i + 1);
if (temp >= 65) {
str[i] = temp;
}
else {
str[i] = 90 - std::abs(65 - temp) % 26 + 1;
}
}
std::cout << str << std::endl;
}
dgd1724