結果

問題 No.894 二種類のバス
コンテスト
ユーザー nupa3zen
提出日時 2025-10-17 09:53:53
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 36 ms / 1,000 ms
コード長 113 bytes
コンパイル時間 277 ms
コンパイル使用メモリ 82,824 KB
実行使用メモリ 53,852 KB
最終ジャッジ日時 2025-10-17 09:53:55
合計ジャッジ時間 1,975 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 17
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import lcm

T, A, B = map(int, input().split())
T -= 1
ans = T//A + T//B - T//lcm(A, B) + 1
print(ans)
0