結果

問題 No.894 二種類のバス
ユーザー satama123
提出日時 2023-11-30 20:47:59
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 165 bytes
コンパイル時間 255 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 52,224 KB
最終ジャッジ日時 2024-09-26 14:51:54
合計ジャッジ時間 2,297 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 5 WA * 12
権限があれば一括ダウンロードができます

ソースコード

diff #

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

def gcd(a, b):
    if b == 0 : return a
    else : return gcd(b, a % b)

L = A * B // gcd(A, B)

print(T // A + T // B - T // L)
0