結果
問題 | No.633 バスの運賃 |
ユーザー | piconic_X |
提出日時 | 2018-01-19 22:02:56 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
AC
|
実行時間 | 14 ms / 2,000 ms |
コード長 | 279 bytes |
コンパイル時間 | 90 ms |
コンパイル使用メモリ | 10,732 KB |
実行使用メモリ | 7,968 KB |
最終ジャッジ日時 | 2023-08-26 00:16:53 |
合計ジャッジ時間 | 875 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 14 ms
7,788 KB |
testcase_01 | AC | 13 ms
7,868 KB |
testcase_02 | AC | 13 ms
7,968 KB |
testcase_03 | AC | 13 ms
7,808 KB |
testcase_04 | AC | 14 ms
7,860 KB |
testcase_05 | AC | 13 ms
7,792 KB |
testcase_06 | AC | 14 ms
7,872 KB |
testcase_07 | AC | 13 ms
7,808 KB |
testcase_08 | AC | 13 ms
7,788 KB |
ソースコード
N = int(input()) A = [0] B = [] C = [] for i in range(N-1): A.append(int(input())) for i in range(N): b, c = map(int, input().split()) B.append(b) C.append(c) people = 0 fare = 0 for i in range(N): fare += people * A[i] people += C[i] - B[i] print(fare)