結果

問題 No.146 試験監督(1)
ユーザー kongarishisyamo
提出日時 2016-03-04 00:12:22
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 231 bytes
コンパイル時間 485 ms
コンパイル使用メモリ 55,764 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-24 14:00:23
合計ジャッジ時間 1,534 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>

using namespace std;

#define MOD 1000000000+7

int main(){

	long long N,C,D,ans=0;

	cin>>N;
	for(int i=0;i<N;i++){
		cin>>C>>D;
		ans+=D;
		C--;
		ans+=(long long)(C/2)*D;
		ans%=MOD;
	}

	cout<<ans<<endl;
}
0