結果
| 問題 | 
                            No.146 試験監督(1)
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2015-05-19 20:51:19 | 
| 言語 | C++11(廃止可能性あり)  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 133 ms / 1,000 ms | 
| コード長 | 241 bytes | 
| コンパイル時間 | 1,242 ms | 
| コンパイル使用メモリ | 158,600 KB | 
| 実行使用メモリ | 6,944 KB | 
| 最終ジャッジ日時 | 2024-07-06 05:44:20 | 
| 合計ジャッジ時間 | 2,375 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 3 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll mod = 1e9+7;
int main(){
int n;cin>>n;
ll sum=0;
for(int i=0;i<n;i++){
ll x,y; cin>>x>>y;
x++;x/=2;
x%=mod;y%=mod;
sum += x * y;
sum %= mod;
}
cout << sum <<endl;
}