結果
| 問題 | No.163 cAPSlOCK |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-05-29 23:06:03 |
| 言語 | Rust (1.83.0 + proconio) |
| 結果 |
WA
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 456 bytes |
| コンパイル時間 | 12,445 ms |
| コンパイル使用メモリ | 404,084 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-06-30 08:03:58 |
| 合計ジャッジ時間 | 12,860 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 20 |
ソースコード
use std::io::stdin;
fn get_line() -> String {
let mut line = String::new();
stdin().read_line(&mut line).ok();
line
}
fn main() {
let line = get_line();
let line = line.as_str();
let mut result = String::new();
for i in line.chars() {
if i.is_uppercase() {
result.push(i.to_ascii_lowercase());
} else {
result.push(i.to_ascii_uppercase())
}
}
println!("{}", result);
}