結果

問題 No.146 試験監督(1)
ユーザー kongarishisyamo
提出日時 2016-03-04 00:13:45
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 233 bytes
コンパイル時間 457 ms
コンパイル使用メモリ 54,988 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-24 14:00:12
合計ジャッジ時間 1,475 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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