結果

問題 No.633 バスの運賃
ユーザー YumekumoYumekumo
提出日時 2018-11-30 19:53:20
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 267 bytes
コンパイル時間 284 ms
コンパイル使用メモリ 87,216 KB
実行使用メモリ 79,140 KB
最終ジャッジ日時 2023-09-09 06:32:43
合計ジャッジ時間 2,765 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 RE -
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())

a = [0]
b = [0]
c = [0]

num = 0
ans = 0 

for i in range(1,n):
    a.append(int(input()))

for i in range(1, n+1):
    b.append(int(input()))
    c.append(int(input()))

for i in range(1,n):
    num = num-b[i]+c[i]
    ans += a[i] * num

print(ans)
0