結果
| 問題 |
No.146 試験監督(1)
|
| コンテスト | |
| ユーザー |
RCCW
|
| 提出日時 | 2017-02-04 21:28:25 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 524 bytes |
| コンパイル時間 | 1,371 ms |
| コンパイル使用メモリ | 157,540 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-24 06:23:22 |
| 合計ジャッジ時間 | 2,494 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 3 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#include <iostream>
#include <cstdio>
#include <algorithm>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i=0;i<(n);i++)
const ll mod = 1e9 + 7;
int main(void){
ll n; cin >> n;
ll ans = 0;
rep(i, n){
ll c, d; cin >> c >> d;
if(c % 2 == 0){
ans += (c / 2) % mod * d % mod;
}else{
ans += (c / 2 + 1) % mod * d % mod;
}
ans %= mod;
}
printf("%lld\n", ans);
return 0;
}
RCCW