結果

問題 No.633 バスの運賃
ユーザー convexineqconvexineq
提出日時 2021-02-26 03:13:45
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 33 ms / 2,000 ms
コード長 161 bytes
コンパイル時間 124 ms
コンパイル使用メモリ 82,856 KB
実行使用メモリ 53,308 KB
最終ジャッジ日時 2024-04-09 19:06:55
合計ジャッジ時間 986 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 32 ms
52,624 KB
testcase_01 AC 32 ms
53,308 KB
testcase_02 AC 32 ms
52,800 KB
testcase_03 AC 32 ms
52,140 KB
testcase_04 AC 33 ms
53,264 KB
testcase_05 AC 30 ms
52,480 KB
testcase_06 AC 31 ms
52,952 KB
testcase_07 AC 30 ms
52,960 KB
testcase_08 AC 30 ms
52,604 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
a = [int(input()) for _ in range(n-1)] + [0]
ans = x = 0
for ai in a:
    b,c = map(int,input().split())
    x += c-b
    ans += x*ai
print(ans)
0