結果

問題 No.894 二種類のバス
ユーザー koyoprokoyopro
提出日時 2020-03-20 23:31:35
言語 Python2
(2.7.18)
結果
AC  
実行時間 22 ms / 1,000 ms
コード長 127 bytes
コンパイル時間 913 ms
コンパイル使用メモリ 6,652 KB
実行使用メモリ 7,840 KB
最終ジャッジ日時 2023-08-22 02:08:18
合計ジャッジ時間 2,774 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 22 ms
7,660 KB
testcase_01 AC 22 ms
7,664 KB
testcase_02 AC 22 ms
7,652 KB
testcase_03 AC 22 ms
7,840 KB
testcase_04 AC 21 ms
7,596 KB
testcase_05 AC 22 ms
7,668 KB
testcase_06 AC 22 ms
7,824 KB
testcase_07 AC 22 ms
7,644 KB
testcase_08 AC 21 ms
7,612 KB
testcase_09 AC 22 ms
7,648 KB
testcase_10 AC 22 ms
7,772 KB
testcase_11 AC 21 ms
7,812 KB
testcase_12 AC 21 ms
7,720 KB
testcase_13 AC 22 ms
7,680 KB
testcase_14 AC 21 ms
7,796 KB
testcase_15 AC 21 ms
7,720 KB
testcase_16 AC 21 ms
7,796 KB
testcase_17 AC 22 ms
7,832 KB
testcase_18 AC 22 ms
7,820 KB
testcase_19 AC 22 ms
7,652 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from fractions import gcd

T,A,B = [int(x) for x in raw_input().split()]

T -= 1;
AB=A*B/gcd(A,B);
print(T/A + T/B - T/AB + 1)
0