結果
| 問題 | No.18 うーさー暗号 |
| コンテスト | |
| ユーザー |
ta60143
|
| 提出日時 | 2019-02-12 16:07:11 |
| 言語 | Rust (1.97.1 + proconio + num + itertools + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 0 ms / 5,000 ms |
| + 832µs | |
| コード長 | 509 bytes |
| 記録 | |
| コンパイル時間 | 523 ms |
| コンパイル使用メモリ | 177,760 KB |
| 実行使用メモリ | 6,272 KB |
| 最終ジャッジ日時 | 2026-08-26 02:03:33 |
| 合計ジャッジ時間 | 2,086 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 13 |
ソースコード
fn main() {
let s1: String = read();
let s1 = s1.chars();
let mut plane = String::new();
let mut index = 1;
let ascii_a = 'A' as u8;
for c in s1 {
let c_plane = (((c as u8) + 26 - ascii_a - index) % 26 + ascii_a) as char;
plane.push(c_plane);
index = (index + 1) % 26;
}
println!("{}", plane);
}
fn read<T: std::str::FromStr>() -> T {
let mut s = String::new();
std::io::stdin().read_line(&mut s).ok();
s.trim().parse().ok().unwrap()
}
ta60143