結果

問題 No.633 バスの運賃
ユーザー dangodango
提出日時 2023-06-13 16:17:19
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 85 ms / 2,000 ms
コード長 163 bytes
コンパイル時間 1,202 ms
コンパイル使用メモリ 86,436 KB
実行使用メモリ 71,040 KB
最終ジャッジ日時 2023-09-04 01:29:20
合計ジャッジ時間 2,005 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
71,008 KB
testcase_01 AC 75 ms
71,040 KB
testcase_02 AC 75 ms
70,812 KB
testcase_03 AC 74 ms
70,828 KB
testcase_04 AC 77 ms
70,860 KB
testcase_05 AC 85 ms
70,956 KB
testcase_06 AC 73 ms
71,000 KB
testcase_07 AC 73 ms
70,828 KB
testcase_08 AC 74 ms
71,004 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = [int(input()) for _ in range(N - 1)] + [0]
RE = X = 0
for i in A:
    B, C = map(int,input().split())
    X += C - B
    RE += X * i
print(RE)
0