結果

問題 No.146 試験監督(1)
ユーザー RK PythonRK Python
提出日時 2020-06-03 20:29:23
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 187 ms / 1,000 ms
コード長 195 bytes
コンパイル時間 484 ms
コンパイル使用メモリ 10,628 KB
実行使用メモリ 7,852 KB
最終ジャッジ日時 2023-08-16 20:19:37
合計ジャッジ時間 1,936 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

import sys
input=lambda: sys.stdin.readline().rstrip()
mod=10**9+7
n=int(input())
ans=0
for _ in range(n):
  c,d=map(int,input().split())
  ans+=((c+1)//2)*d
  if ans>mod:
    ans%=mod
print(ans)
0