結果

問題 No.146 試験監督(1)
ユーザー utsumidaisukeutsumidaisuke
提出日時 2018-12-14 09:49:52
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 359 ms / 1,000 ms
コード長 217 bytes
コンパイル時間 121 ms
コンパイル使用メモリ 11,824 KB
実行使用メモリ 10,084 KB
最終ジャッジ日時 2023-10-25 09:54:08
合計ジャッジ時間 2,172 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 359 ms
10,084 KB
testcase_01 AC 355 ms
10,084 KB
testcase_02 AC 356 ms
10,084 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

t = int(input())
mod = 1000000007
total = 0
for i in range(t):
    p, n = map(int,input().split())
    if p % 2 == 0:
        c = p//2
    else:
        c = p//2 + 1
    total += c*n
    total = total%mod
print(total)
0