結果
| 問題 |
No.476 正しくない平均
|
| コンテスト | |
| ユーザー |
あいうえお
|
| 提出日時 | 2017-02-11 00:15:48 |
| 言語 | Rust (1.83.0 + proconio) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 490 bytes |
| コンパイル時間 | 12,178 ms |
| コンパイル使用メモリ | 401,200 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-29 08:14:08 |
| 合計ジャッジ時間 | 13,353 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 26 |
ソースコード
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();
str = String::new();
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");
}
}
あいうえお