結果
| 問題 |
No.637 X: Yet Another FizzBuzz Problem
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-02-09 12:11:17 |
| 言語 | Rust (1.83.0 + proconio) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 1,000 ms |
| コード長 | 381 bytes |
| コンパイル時間 | 12,491 ms |
| コンパイル使用メモリ | 390,896 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-10-01 05:50:28 |
| 合計ジャッジ時間 | 11,902 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 30 |
ソースコード
use std::io::Read;
fn main() {
let mut a = String::new();
std::io::stdin().read_to_string(&mut a).ok();
let a: usize = a.trim().split('\n').next().unwrap().split_whitespace()
.map(|s| s.parse::<usize>().unwrap())
.map(|s| if s % 15 == 0 { 8 } else if s % 5 == 0 || s % 3 == 0 { 4 } else { s.to_string().len() })
.sum();
println!("{}", a);
}