結果
| 問題 | No.163 cAPSlOCK |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-11-17 15:56:56 |
| 言語 | Rust (1.99.1 + proconio + num + itertools + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 5,000 ms |
| + 51µs | |
| コード長 | 512 bytes |
| 記録 | |
| コンパイル時間 | 4,383 ms |
| コンパイル使用メモリ | 184,220 KB |
| 実行使用メモリ | 9,872 KB |
| 最終ジャッジ日時 | 2026-11-17 15:57:03 |
| 合計ジャッジ時間 | 6,577 ms |
|
ジャッジサーバーID (参考情報) |
judge5_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
ソースコード
use std::collections::HashMap;
use proconio::input;
fn main() {
let a = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
let b = "abcdefghijklmnopqrstuvwxyz";
let mut h = HashMap::new();
for i in 0..26 {
h.insert(a.chars().nth(i).unwrap(), b.chars().nth(i).unwrap());
h.insert(b.chars().nth(i).unwrap(), a.chars().nth(i).unwrap());
}
input!(
s: String,
);
let mut ans = String::from("");
for c in s.chars() {
ans.push(h[&c]);
}
println!("{}", ans);
}