結果

問題 No.146 試験監督(1)
ユーザー neko_the_shadowneko_the_shadow
提出日時 2019-02-28 15:40:13
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 337 ms / 1,000 ms
コード長 264 bytes
コンパイル時間 72 ms
コンパイル使用メモリ 10,628 KB
実行使用メモリ 16,136 KB
最終ジャッジ日時 2023-09-05 16:12:16
合計ジャッジ時間 2,110 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 337 ms
15,984 KB
testcase_01 AC 334 ms
16,024 KB
testcase_02 AC 334 ms
16,136 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
clist = []
dlist = []
for _ in range(n):
    c, d = map(int, input().split())
    clist.append(c)
    dlist.append(d)

ans = 0
for c, d in zip(clist, dlist):
    e = c // 2 if c % 2 == 0 else c // 2 + 1
    ans += e * d

print(ans % (10 ** 9 + 7))
0