結果
問題 | No.894 二種類のバス |
ユーザー | buriburi |
提出日時 | 2019-10-17 09:11:08 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 260 bytes |
コンパイル時間 | 93 ms |
コンパイル使用メモリ | 10,568 KB |
実行使用メモリ | 8,144 KB |
最終ジャッジ日時 | 2023-09-06 02:42:41 |
合計ジャッジ時間 | 1,437 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | AC | 16 ms
7,888 KB |
testcase_02 | AC | 16 ms
7,992 KB |
testcase_03 | AC | 16 ms
7,848 KB |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | AC | 16 ms
7,852 KB |
testcase_07 | AC | 15 ms
8,092 KB |
testcase_08 | WA | - |
testcase_09 | AC | 15 ms
7,976 KB |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | AC | 15 ms
7,968 KB |
testcase_18 | WA | - |
testcase_19 | AC | 15 ms
7,984 KB |
ソースコード
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))