結果

問題 No.316 もっと刺激的なFizzBuzzをください
ユーザー yuppe19 😺yuppe19 😺
提出日時 2015-12-09 09:43:30
言語 Python2
(2.7.18)
結果
AC  
実行時間 23 ms / 1,000 ms
コード長 272 bytes
コンパイル時間 116 ms
コンパイル使用メモリ 6,456 KB
実行使用メモリ 7,804 KB
最終ジャッジ日時 2023-08-13 15:39:11
合計ジャッジ時間 2,824 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 21 ms
7,632 KB
testcase_01 AC 22 ms
7,604 KB
testcase_02 AC 22 ms
7,564 KB
testcase_03 AC 22 ms
7,804 KB
testcase_04 AC 22 ms
7,688 KB
testcase_05 AC 22 ms
7,620 KB
testcase_06 AC 23 ms
7,612 KB
testcase_07 AC 23 ms
7,688 KB
testcase_08 AC 22 ms
7,608 KB
testcase_09 AC 22 ms
7,608 KB
testcase_10 AC 22 ms
7,792 KB
testcase_11 AC 22 ms
7,584 KB
testcase_12 AC 22 ms
7,780 KB
testcase_13 AC 22 ms
7,776 KB
testcase_14 AC 22 ms
7,796 KB
testcase_15 AC 22 ms
7,692 KB
testcase_16 AC 23 ms
7,564 KB
testcase_17 AC 22 ms
7,668 KB
testcase_18 AC 22 ms
7,624 KB
testcase_19 AC 22 ms
7,616 KB
testcase_20 AC 22 ms
7,776 KB
testcase_21 AC 22 ms
7,780 KB
testcase_22 AC 22 ms
7,632 KB
testcase_23 AC 21 ms
7,620 KB
testcase_24 AC 21 ms
7,588 KB
testcase_25 AC 22 ms
7,560 KB
testcase_26 AC 22 ms
7,560 KB
testcase_27 AC 22 ms
7,620 KB
testcase_28 AC 22 ms
7,784 KB
testcase_29 AC 22 ms
7,800 KB
testcase_30 AC 22 ms
7,780 KB
testcase_31 AC 22 ms
7,692 KB
testcase_32 AC 22 ms
7,792 KB
testcase_33 AC 22 ms
7,792 KB
testcase_34 AC 22 ms
7,596 KB
testcase_35 AC 22 ms
7,668 KB
testcase_36 AC 22 ms
7,784 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/python
from fractions import gcd
lcm = lambda a, b: a * b / gcd(a, b)
lcmx = lambda *arr: reduce(lcm, arr)

n = int(raw_input())
a, b, c = map(int, raw_input().split())
res = n/a + n/b + n/c - n/lcm(a, b) - n/lcm(b, c) - n/lcm(c, a) + n/lcmx(a, b, c)
print res
0