結果

問題 No.894 二種類のバス
ユーザー 👑 rin204rin204
提出日時 2022-01-19 00:18:21
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 66 ms / 1,000 ms
コード長 123 bytes
コンパイル時間 389 ms
コンパイル使用メモリ 86,512 KB
実行使用メモリ 71,520 KB
最終ジャッジ日時 2023-08-15 07:46:25
合計ジャッジ時間 3,213 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 64 ms
71,352 KB
testcase_01 AC 64 ms
71,232 KB
testcase_02 AC 65 ms
71,332 KB
testcase_03 AC 65 ms
71,520 KB
testcase_04 AC 66 ms
71,232 KB
testcase_05 AC 65 ms
71,508 KB
testcase_06 AC 64 ms
71,228 KB
testcase_07 AC 63 ms
71,228 KB
testcase_08 AC 63 ms
71,288 KB
testcase_09 AC 62 ms
71,252 KB
testcase_10 AC 65 ms
71,340 KB
testcase_11 AC 65 ms
71,228 KB
testcase_12 AC 63 ms
71,120 KB
testcase_13 AC 62 ms
71,500 KB
testcase_14 AC 63 ms
71,236 KB
testcase_15 AC 65 ms
71,120 KB
testcase_16 AC 64 ms
71,332 KB
testcase_17 AC 65 ms
71,280 KB
testcase_18 AC 62 ms
71,280 KB
testcase_19 AC 61 ms
71,016 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import gcd

t, a, b = map(int, input().split())
t -= 1
l = a * b // gcd(a, b)
print(1 + t // a + t // b - t // l)
0