結果

問題 No.894 二種類のバス
ユーザー 👑 rin204
提出日時 2022-01-19 00:18:21
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 47 ms / 1,000 ms
コード長 123 bytes
コンパイル時間 228 ms
コンパイル使用メモリ 82,404 KB
実行使用メモリ 52,352 KB
最終ジャッジ日時 2024-11-23 13:38:17
合計ジャッジ時間 1,962 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 17
権限があれば一括ダウンロードができます

ソースコード

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