結果
| 問題 |
No.637 X: Yet Another FizzBuzz Problem
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-07-16 16:40:01 |
| 言語 | Rust (1.83.0 + proconio) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 1,000 ms |
| コード長 | 463 bytes |
| コンパイル時間 | 12,789 ms |
| コンパイル使用メモリ | 377,148 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-17 15:13:16 |
| 合計ジャッジ時間 | 11,024 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 30 |
ソースコード
fn main() {
let mut input = String::new();
std::io::stdin().read_line(&mut input).ok();
println!(
"{}",
input
.trim()
.split_whitespace()
.map(|x| x.parse::<u32>().unwrap())
.map(|a| match (a % 3, a % 5) {
(0, 0) => 8,
(_, 0) => 4,
(0, _) => 4,
_ => a.to_string().len(),
})
.sum::<usize>()
);
}