結果
問題 | No.633 バスの運賃 |
ユーザー | Bioinfo_K |
提出日時 | 2018-01-19 21:58:04 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
AC
|
実行時間 | 19 ms / 2,000 ms |
コード長 | 401 bytes |
コンパイル時間 | 460 ms |
コンパイル使用メモリ | 10,760 KB |
実行使用メモリ | 8,652 KB |
最終ジャッジ日時 | 2023-08-26 00:16:07 |
合計ジャッジ時間 | 968 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 18 ms
8,632 KB |
testcase_01 | AC | 19 ms
8,560 KB |
testcase_02 | AC | 19 ms
8,500 KB |
testcase_03 | AC | 19 ms
8,652 KB |
testcase_04 | AC | 18 ms
8,636 KB |
testcase_05 | AC | 18 ms
8,508 KB |
testcase_06 | AC | 18 ms
8,612 KB |
testcase_07 | AC | 19 ms
8,556 KB |
testcase_08 | AC | 19 ms
8,460 KB |
ソースコード
import sys,collections;sys.setrecursionlimit(10**7) from operator import itemgetter def Is(): return [int(x) for x in sys.stdin.readline().split()] def Ss(): return sys.stdin.readline().split() def I(): return int(sys.stdin.readline()) def S(): return input() n = I() a = [0] for _ in range(n-1): a.append(I()) p = 0 f = 0 for i in range(n): b,c = Is() f += p*a[i] p += c - b print(f)