結果
| 問題 |
No.146 試験監督(1)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-02-23 12:13:07 |
| 言語 | Rust (1.83.0 + proconio) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 516 bytes |
| コンパイル時間 | 20,819 ms |
| コンパイル使用メモリ | 378,236 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-10 01:44:06 |
| 合計ジャッジ時間 | 14,484 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 3 |
ソースコード
fn main() {
let mut n = String::new();
std::io::stdin().read_line(&mut n).ok();
let n: usize = n.trim().parse().unwrap();
const DIVIDER: usize = 1_000_000_007;
let mut result: usize = 0;
for _ in 0..n {
let mut cd = String::new();
std::io::stdin().read_line(&mut cd).ok();
let cd: Vec<usize> = cd.trim().split_whitespace().map(|s| s.parse().unwrap()).collect();
result += (cd[0] + 1) / 2 * cd[1];
result %= DIVIDER;
}
println!("{}", result);
}