結果
| 問題 |
No.146 試験監督(1)
|
| コンテスト | |
| ユーザー |
fumi6328
|
| 提出日時 | 2018-10-06 11:55:31 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 128 ms / 1,000 ms |
| コード長 | 351 bytes |
| コンパイル時間 | 1,402 ms |
| コンパイル使用メモリ | 167,192 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-10-12 13:45:00 |
| 合計ジャッジ時間 | 2,367 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 3 |
ソースコード
#include <bits/stdc++.h>
const int mod = 1e9+7;
using namespace std;
int main()
{
int n;
cin >> n;
long long c,d,ans = 0;
for(int i = 0; i < n; i++){
cin >> c >> d;
d %= mod;
ans += (((c + 1) / 2) % mod * d) % mod;
ans %= mod;
}
cout << ans << endl;
return 0;
}
fumi6328