結果

問題 No.146 試験監督(1)
ユーザー tntantntan
提出日時 2016-04-03 23:41:20
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 286 bytes
コンパイル時間 1,236 ms
コンパイル使用メモリ 159,580 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-10 11:06:13
合計ジャッジ時間 2,211 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
 
int main()
{
	int n;
	ll c,k,sum=0,a;
	cin>>n;
	for(int i=0;i<n;i++)
	{
		cin>>c>>k;
		if(c%2)a=(c/2+1)*k%1000000007;
		else a=(c/2)*k%1000000007;
		sum+=a;
		sum%=1000000007;
	}
    cout<<sum<<endl;
    return 0;
}
0