結果
問題 |
No.476 正しくない平均
|
ユーザー |
![]() |
提出日時 | 2017-02-11 00:13:29 |
言語 | Rust (1.83.0 + proconio) |
結果 |
WA
|
実行時間 | - |
コード長 | 465 bytes |
コンパイル時間 | 15,649 ms |
コンパイル使用メモリ | 379,672 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-29 08:13:15 |
合計ジャッジ時間 | 17,239 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 15 WA * 11 |
ソースコード
use std::io; fn main() { let mut str = String::new(); io::stdin().read_line(&mut str).ok().expect("piyo"); let v : Vec<u64> = str.split_whitespace().map(|x|x.parse().ok().expect("foo")).collect(); io::stdin().read_line(&mut str).ok().expect("piyo"); let w = str.split_whitespace().map(|x| x.parse::<u64>().ok().expect("bar")).fold(0, |a, b| a + b); if v[0] * v[1] == w { println!("YES"); } else { println!("NO"); } }