結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
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;
	cin>>n;
	for(int i=0;i<n;i++)
	{
		cin>>c>>k;
		if(c%2)sum+=(c/2+1)*k;
		else sum+=(c/2)*k;
		sum%=1000000007;
	}
    cout<<sum<<endl;
    return 0;
}
0