結果

問題 No.633 バスの運賃
ユーザー bellangeldindonbellangeldindon
提出日時 2019-05-14 16:16:25
言語 Python2
(2.7.18)
結果
AC  
実行時間 11 ms / 2,000 ms
コード長 246 bytes
コンパイル時間 294 ms
コンパイル使用メモリ 6,728 KB
実行使用メモリ 6,100 KB
最終ジャッジ日時 2023-09-25 19:40:27
合計ジャッジ時間 1,105 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
5,920 KB
testcase_01 AC 11 ms
6,008 KB
testcase_02 AC 11 ms
6,044 KB
testcase_03 AC 11 ms
6,100 KB
testcase_04 AC 11 ms
5,920 KB
testcase_05 AC 11 ms
5,864 KB
testcase_06 AC 11 ms
6,084 KB
testcase_07 AC 11 ms
5,800 KB
testcase_08 AC 11 ms
6,016 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(raw_input())
fee = []
for i in range(0, n-1):
	fee.append(int(raw_input()))
b, c = map(int, raw_input().split())
now = c
sum = 0
for i in range(0, n-1):
	sum += fee[i]*now
	b, c = map(int, raw_input().split())
	now = now - b + c
print sum
0