結果
| 問題 |
No.146 試験監督(1)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-04-01 11:00:46 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 409 bytes |
| コンパイル時間 | 3,855 ms |
| コンパイル使用メモリ | 250,232 KB |
| 最終ジャッジ日時 | 2025-02-20 18:48:21 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 3 |
ソースコード
#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
using ll = long long;
using ld = long double;
ll N, C, D, ans;
ll mod = 1000000007;
int main() {
cin >> N;
for (int i = 0; i < N; i++) {
cin >> C >> D;
if (C % 2 == 1) ans = (ans + ((C + 1) / 2 * D) % mod) % mod;
else ans = (ans + (C / 2 * D) % mod) % mod;
}
cout << ans << endl;
return 0;
}