結果
| 問題 |
No.637 X: Yet Another FizzBuzz Problem
|
| コンテスト | |
| ユーザー |
ixTL255
|
| 提出日時 | 2023-03-18 12:29:19 |
| 言語 | Rust (1.83.0 + proconio) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 1,000 ms |
| コード長 | 429 bytes |
| コンパイル時間 | 12,799 ms |
| コンパイル使用メモリ | 388,532 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-09-18 13:13:09 |
| 合計ジャッジ時間 | 14,391 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 30 |
ソースコード
fn main() {
let mut s = String::new();
std::io::stdin().read_line(&mut s).ok();
let a: Vec<isize> = s.trim().split_whitespace()
.map(|x| x.parse().unwrap()).collect();
let mut ans = 0;
for i in a {
ans += match (i % 3, i % 5) {
(0, 0) => 8,
(0, _) => 4,
(_, 0) => 4,
_ => i.to_string().chars().count(),
}
}
println!("{}", ans);
}
ixTL255