結果

問題 No.894 二種類のバス
ユーザー kumatan400
提出日時 2022-06-18 01:44:14
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 154 bytes
コンパイル時間 169 ms
コンパイル使用メモリ 82,140 KB
実行使用メモリ 54,464 KB
最終ジャッジ日時 2024-10-09 12:22:39
合計ジャッジ時間 1,832 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 3 WA * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

T, A, B = map(int, input().split())

from math import gcd
def lcm(x, y):
    return x*y // gcd(x, y)

T += 1
ans = T//A + T//B - T//(lcm(A, B))
print(ans)
0