結果
問題 | No.163 cAPSlOCK |
ユーザー |
|
提出日時 | 2019-10-10 15:02:39 |
言語 | Rust (1.83.0 + proconio) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 596 bytes |
コンパイル時間 | 12,208 ms |
コンパイル使用メモリ | 403,616 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-21 11:22:01 |
合計ジャッジ時間 | 13,320 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
ソースコード
fn getline() -> String { let mut __ret = String::new(); std::io::stdin().read_line(&mut __ret).ok(); return __ret; } fn main() { let line = getline(); let password_yesterday = line.trim(); let mut password = String::new(); for c in password_yesterday.chars().into_iter() { if c.is_ascii_lowercase() { let c_upper = &c.to_ascii_uppercase().to_string(); password += c_upper; } else { let c_lower = &c.to_ascii_lowercase().to_string(); password += c_lower; } } println!("{}", password); }