結果

問題 No.146 試験監督(1)
ユーザー Lay_ecLay_ec
提出日時 2015-02-08 23:39:08
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 619 bytes
コンパイル時間 532 ms
コンパイル使用メモリ 76,792 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-05 11:58:45
合計ジャッジ時間 1,562 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <algorithm>
#include <cstdlib>
#include <ctime>
#include <cstdio>
#include <functional>
#include <set>
#include <sstream>
#include <map>
#include <queue>

using namespace std;
 
const unsigned long long mod = 1000000000+7;

int main()
{

	int n;
	cin>>n;

	unsigned long long res=0;
	vector<unsigned long long> a(n);

	for(int i=0;i<n;i++){
		unsigned long long c,d;
		cin>>c>>d;

		a[i]=(((unsigned long long)ceil(c/2.0))%mod)*(d%mod);
		a[i]%=mod;
	}

	for(int i=0;i<n;i++){
		res+=a[i];
		res%=mod;
	}

	cout<<res<<endl;

	return 0;
}
0