結果
問題 | No.894 二種類のバス |
ユーザー | tter4 |
提出日時 | 2019-09-28 00:46:16 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 163 bytes |
コンパイル時間 | 1,905 ms |
コンパイル使用メモリ | 81,412 KB |
実行使用メモリ | 53,396 KB |
最終ジャッジ日時 | 2023-10-25 08:45:03 |
合計ジャッジ時間 | 3,636 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | AC | 38 ms
53,396 KB |
testcase_12 | AC | 38 ms
53,396 KB |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | AC | 38 ms
53,396 KB |
testcase_16 | WA | - |
testcase_17 | AC | 38 ms
53,396 KB |
testcase_18 | AC | 38 ms
53,396 KB |
testcase_19 | AC | 40 ms
53,396 KB |
ソースコード
from math import gcd t, a, b = list(map(int, input().split())) lcm = a * b // gcd(a, b) ca = (t-a+1)//a cb = (t-b+1)//b clcm = (t-lcm+1)//lcm print(ca+cb-clcm+1)