結果

問題 No.894 二種類のバス
ユーザー convexineqconvexineq
提出日時 2021-04-05 13:01:42
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 74 ms / 1,000 ms
コード長 113 bytes
コンパイル時間 507 ms
コンパイル使用メモリ 87,256 KB
実行使用メモリ 71,644 KB
最終ジャッジ日時 2023-08-29 01:53:02
合計ジャッジ時間 4,043 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,548 KB
testcase_01 AC 74 ms
71,228 KB
testcase_02 AC 72 ms
71,480 KB
testcase_03 AC 72 ms
71,488 KB
testcase_04 AC 72 ms
71,116 KB
testcase_05 AC 72 ms
71,316 KB
testcase_06 AC 73 ms
71,644 KB
testcase_07 AC 72 ms
71,544 KB
testcase_08 AC 73 ms
71,104 KB
testcase_09 AC 73 ms
71,104 KB
testcase_10 AC 73 ms
70,920 KB
testcase_11 AC 71 ms
71,492 KB
testcase_12 AC 72 ms
71,280 KB
testcase_13 AC 71 ms
71,364 KB
testcase_14 AC 72 ms
71,276 KB
testcase_15 AC 72 ms
71,400 KB
testcase_16 AC 73 ms
71,116 KB
testcase_17 AC 72 ms
71,096 KB
testcase_18 AC 72 ms
71,320 KB
testcase_19 AC 72 ms
71,644 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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