結果
問題 |
No.633 バスの運賃
|
ユーザー |
![]() |
提出日時 | 2018-02-22 18:33:07 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 32 ms / 2,000 ms |
コード長 | 430 bytes |
コンパイル時間 | 445 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-10-02 05:06:04 |
合計ジャッジ時間 | 1,076 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 9 |
ソースコード
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys n = int(sys.stdin.readline().split(' ')[0]) f = [] for i in range(n-1): l = sys.stdin.readline().split(' ') f.append(int(l[0])) on = [] off = [] for i in range(n-1): l = sys.stdin.readline().split(' ') off.append(int(l[0])) on.append(int(l[1])) ans = 0 passgr = 0 for i in range(n-1): passgr += on[i] - off[i] ans += f[i] * passgr print(ans)