結果
| 問題 |
No.894 二種類のバス
|
| コンテスト | |
| ユーザー |
buriburi
|
| 提出日時 | 2019-10-17 09:11:08 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 260 bytes |
| コンパイル時間 | 105 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-06-23 21:34:01 |
| 合計ジャッジ時間 | 1,487 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 6 WA * 11 |
ソースコード
import math as m
def lcm(x, y):
return (x * y) // m.gcd(x, y)
T, A, B = map(int, input().split())
T = m.floor(T)
#How many times bus A departs ?
x = T/A
y = T/B
#How many times both buses depart simultaneously?
xy = T/lcm(A, B)
print(int(x + y - xy))
buriburi