結果

問題 No.146 試験監督(1)
ユーザー srup٩(๑`н´๑)۶
提出日時 2016-10-08 08:21:50
言語 Python2
(2.7.18)
結果
AC  
実行時間 311 ms / 1,000 ms
コード長 219 bytes
コンパイル時間 51 ms
コンパイル使用メモリ 6,912 KB
実行使用メモリ 9,344 KB
最終ジャッジ日時 2024-11-21 20:25:32
合計ジャッジ時間 1,880 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(raw_input())
ans = 0
#mod = 10**9 + 7
mod = int(1e9 + 7)

for i in range(n):
	c, d = map(int, raw_input().split())
	if c % 2 == 0:
		ans += (c / 2) * d
	else:
		ans += (c / 2 + 1) * d
	ans %= mod

print int(ans)
0