結果

問題 No.146 試験監督(1)
ユーザー fiord
提出日時 2015-04-25 14:53:38
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 137 ms / 1,000 ms
コード長 239 bytes
コンパイル時間 438 ms
コンパイル使用メモリ 54,600 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-05 02:20:59
合計ジャッジ時間 1,465 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#define E 1000000007
using namespace std;
int main(){
	int n;	cin>>n;
	long long int c,d,count=0;
	for(int i=0;i<n;i++){
		cin>>c>>d;
		d%=E;
		c=(c+1)/2%E;
		count+=c*d;
		count%=E;
	}
	cout<<count<<endl;
	return 0;
}
0