結果
| 問題 | 
                            No.146 試験監督(1)
                             | 
                    
| コンテスト | |
| ユーザー | 
                             tenkyu9
                         | 
                    
| 提出日時 | 2018-03-09 01:06:50 | 
| 言語 | C++11(廃止可能性あり)  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 139 ms / 1,000 ms | 
| コード長 | 441 bytes | 
| コンパイル時間 | 700 ms | 
| コンパイル使用メモリ | 76,104 KB | 
| 実行使用メモリ | 6,820 KB | 
| 最終ジャッジ日時 | 2024-10-05 08:21:17 | 
| 合計ジャッジ時間 | 1,686 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 3 | 
ソースコード
#include<iostream>
#include<string>
#include<algorithm>
#include<cmath>
#include<iomanip>
#include<cstring>
#include<map>
#include<vector>
using namespace std;
typedef long long int ll;
int main(){
  int n;
  cin >> n;
  ll ans=0;
  vector<ll> c(n), d(n);
  for(int i=0; i<n; i++){
    cin >> c[i] >> d[i];
    ans+=((((c[i]+1)/2)%(1000000000+7))*(d[i]%(1000000000+7)));
    ans%=(1000000000+7);
  }
  cout << ans << endl;
  
  return 0;
}
            
            
            
        
            
tenkyu9