結果

問題 No.894 二種類のバス
ユーザー ああいいああいい
提出日時 2021-12-24 19:15:31
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 215 bytes
コンパイル時間 155 ms
コンパイル使用メモリ 11,772 KB
実行使用メモリ 10,100 KB
最終ジャッジ日時 2023-10-19 22:12:53
合計ジャッジ時間 1,976 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 32 ms
10,100 KB
testcase_01 AC 30 ms
10,100 KB
testcase_02 AC 30 ms
10,100 KB
testcase_03 AC 30 ms
10,100 KB
testcase_04 AC 30 ms
10,100 KB
testcase_05 AC 30 ms
10,100 KB
testcase_06 AC 30 ms
10,100 KB
testcase_07 AC 30 ms
10,100 KB
testcase_08 AC 30 ms
10,100 KB
testcase_09 AC 29 ms
10,100 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 30 ms
10,100 KB
testcase_15 WA -
testcase_16 AC 29 ms
10,100 KB
testcase_17 WA -
testcase_18 AC 29 ms
10,100 KB
testcase_19 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

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

def gcd(a,b):
    while True:
        r = a % b
        a = b
        b = r
        if r == 0:
            return a
C = A * B // gcd(A,B)
print(T // A + 1 + T // B + 1 - T // C - 1)
0