結果

問題 No.316 もっと刺激的なFizzBuzzをください
ユーザー bellangeldindonbellangeldindon
提出日時 2019-05-13 16:29:23
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 275 bytes
コンパイル時間 430 ms
コンパイル使用メモリ 6,664 KB
実行使用メモリ 6,080 KB
最終ジャッジ日時 2023-09-22 02:59:27
合計ジャッジ時間 1,971 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
5,996 KB
testcase_01 WA -
testcase_02 AC 11 ms
5,852 KB
testcase_03 AC 11 ms
5,992 KB
testcase_04 AC 10 ms
6,024 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 10 ms
5,832 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 11 ms
5,992 KB
testcase_13 AC 10 ms
5,864 KB
testcase_14 AC 10 ms
5,900 KB
testcase_15 AC 11 ms
5,828 KB
testcase_16 AC 12 ms
6,044 KB
testcase_17 AC 11 ms
5,900 KB
testcase_18 AC 10 ms
5,896 KB
testcase_19 AC 11 ms
5,852 KB
testcase_20 AC 11 ms
5,988 KB
testcase_21 AC 11 ms
5,932 KB
testcase_22 AC 11 ms
5,864 KB
testcase_23 AC 11 ms
5,900 KB
testcase_24 AC 11 ms
5,896 KB
testcase_25 AC 10 ms
5,892 KB
testcase_26 AC 11 ms
5,868 KB
testcase_27 AC 10 ms
5,956 KB
testcase_28 WA -
testcase_29 AC 11 ms
5,864 KB
testcase_30 WA -
testcase_31 AC 11 ms
5,996 KB
testcase_32 AC 10 ms
5,876 KB
testcase_33 WA -
testcase_34 AC 10 ms
5,828 KB
testcase_35 AC 11 ms
5,868 KB
testcase_36 AC 10 ms
5,860 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def euc(x, y):
	if y == 0: return x
	return euc(y, x%y)

N = int(raw_input())
a, b, c = map(int, raw_input().split())
mab = a * b / euc(a, b)
mbc = b * c / euc(b, c)
mca = c * a / euc(c, a)
mabc = a * b * c / euc(mab, c)
print N/a + N/b + N/c - N/mab - N/mbc - N/mca + N/mabc
0