結果

問題 No.146 試験監督(1)
ユーザー shinshin
提出日時 2022-10-16 17:13:44
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 363 ms / 1,000 ms
コード長 221 bytes
コンパイル時間 81 ms
コンパイル使用メモリ 10,488 KB
実行使用メモリ 7,880 KB
最終ジャッジ日時 2023-09-09 19:35:14
合計ジャッジ時間 2,085 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 363 ms
7,880 KB
testcase_01 AC 360 ms
7,852 KB
testcase_02 AC 362 ms
7,820 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#試験監督(1)

N = int(input())
sum = 0
m = 10 ** 9 + 7

for i in range(N):
    cd = list(map(int , input().split()))
    cd[0] = ((cd[0] + 1) // 2) % m
    cd[1] %= m
    sum += cd[0] * cd[1]
    sum %= m

print(sum)
0