結果

問題 No.316 もっと刺激的なFizzBuzzをください
ユーザー steek79steek79
提出日時 2015-12-09 00:49:32
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 285 bytes
コンパイル時間 74 ms
コンパイル使用メモリ 6,700 KB
実行使用メモリ 6,208 KB
最終ジャッジ日時 2023-10-12 22:24:04
合計ジャッジ時間 1,975 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 12 ms
5,972 KB
testcase_01 WA -
testcase_02 AC 12 ms
6,148 KB
testcase_03 AC 11 ms
6,120 KB
testcase_04 AC 11 ms
6,180 KB
testcase_05 WA -
testcase_06 AC 12 ms
6,036 KB
testcase_07 AC 11 ms
6,060 KB
testcase_08 AC 11 ms
6,036 KB
testcase_09 AC 12 ms
6,112 KB
testcase_10 AC 12 ms
5,976 KB
testcase_11 AC 11 ms
6,116 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 11 ms
5,968 KB
testcase_15 AC 12 ms
5,972 KB
testcase_16 AC 11 ms
6,048 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 12 ms
6,112 KB
testcase_24 AC 12 ms
5,980 KB
testcase_25 WA -
testcase_26 AC 11 ms
6,004 KB
testcase_27 AC 12 ms
6,176 KB
testcase_28 AC 11 ms
6,124 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 AC 11 ms
6,116 KB
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

N = input()
a, b, c = map(int, raw_input().split())

if c%a == 0:
    c = N+1
if b%a == 0:
    b = N+1

divA = N/a
divB = N/b
divC = N/c
div1 = divA + divB + divC

divAB = N/(a*b)
divBC = N/(b*c)
divCA = N/(c*a)
div2 = divAB + divBC + divCA

div3 = N/(a*b*c)

print div1 - div2 + div3
0