結果

問題 No.146 試験監督(1)
ユーザー KKT89KKT89
提出日時 2020-06-10 23:23:14
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 374 bytes
コンパイル時間 779 ms
コンパイル使用メモリ 94,592 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-06 00:24:11
合計ジャッジ時間 1,645 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <iostream>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
#include <math.h>
using namespace std;
typedef long long int ll;

constexpr ll mod=1e9+7;

int main(){
	cin.tie(nullptr);
	ios::sync_with_stdio(false);
	int q; cin >> q;
	ll res=0;
	while(q--){
		ll a,b; cin >> a >> b;
		a=(a+1)/2;
		(res+=a%mod*b%mod)%=mod;
	}
	cout << res << endl;
}
0