結果
| 問題 | No.18 うーさー暗号 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-02-28 11:55:17 |
| 言語 | C++11 (gcc 15.3.0 + boost 1.92.0) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 5,000 ms |
| + 208µs | |
| コード長 | 436 bytes |
| 記録 | |
| コンパイル時間 | 749 ms |
| コンパイル使用メモリ | 70,272 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-08-10 20:35:52 |
| 合計ジャッジ時間 | 1,309 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 13 |
ソースコード
#include <cstdlib>
#include <iostream>
#include <string>
static constexpr int N_ALPHABET = 'z' - 'a' + 1;
int
main()
{
std::cin.tie(0);
std::ios::sync_with_stdio(false);
std::string s;
std::cin >> s;
for (std::string::size_type i = 0; i < s.length(); i++) {
s[i] = static_cast<char>('A' + ((s[i] - 'A') + (N_ALPHABET - (i + 1) % N_ALPHABET)) % N_ALPHABET);
}
std::cout << s << std::endl;
return EXIT_SUCCESS;
}