結果
| 問題 | 
                            No.146 試験監督(1)
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2020-07-30 18:31:19 | 
| 言語 | C++17  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 45 ms / 1,000 ms | 
| コード長 | 267 bytes | 
| コンパイル時間 | 2,841 ms | 
| コンパイル使用メモリ | 191,904 KB | 
| 最終ジャッジ日時 | 2025-01-12 08:10:48 | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 3 | 
ソースコード
#include<bits/stdc++.h>
#define mod 1000000007
using namespace std;
int main(){
	cin.tie(0),ios::sync_with_stdio(false);
	int n; cin>>n;
	int64_t ans=0;
	for(int i=0;i<n;++i){
		int64_t c,d; cin>>c>>d;
		ans+=(c+1)/2%mod*(d%mod);
		ans%=mod;
	}
	cout<<ans<<"\n"s;
}