結果
問題 |
No.1828 Except 3
|
ユーザー |
|
提出日時 | 2022-03-10 14:30:39 |
言語 | Rust (1.83.0 + proconio) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 979 bytes |
コンパイル時間 | 16,092 ms |
コンパイル使用メモリ | 379,592 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-14 15:31:37 |
合計ジャッジ時間 | 14,754 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 16 |
ソースコード
use std::io; fn main() { let mut buf = String::new(); io::stdin().read_line(&mut buf) .expect("Failed to read line"); let _n: i32 = buf.trim().parse() .expect("not integer"); let mut buf = String::new(); io::stdin().read_line(&mut buf) .expect("Failed to read line"); let a = buf.trim().split_whitespace() .map(|x| x.parse::<i32>().unwrap()); let mut buf = String::new(); io::stdin().read_line(&mut buf) .expect("Failed to read line"); let b = buf.trim().split_whitespace() .map(|x| x.parse::<i32>().unwrap()); let mut buf = String::new(); io::stdin().read_line(&mut buf) .expect("Failed to read line"); let c = buf.trim().split_whitespace() .map(|x| x.parse::<i32>().unwrap()); let an = a.filter(|x| *x % 3 != 0).count(); let bn = b.filter(|x| *x % 3 != 0).count(); let cn = c.filter(|x| *x % 3 != 0).count(); println!("{}", an * bn * cn); }