結果

問題 No.633 バスの運賃
ユーザー Yumekumo
提出日時 2018-11-30 20:55:13
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 32 ms / 2,000 ms
コード長 223 bytes
コンパイル時間 97 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-06-26 23:44:09
合計ジャッジ時間 849 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())

a = [0]


num = 0
ans = 0 

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

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

print(ans)
0