結果

問題 No.316 もっと刺激的なFizzBuzzをください
ユーザー shotoyooshotoyoo
提出日時 2021-06-23 21:57:15
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 75 ms / 1,000 ms
コード長 452 bytes
コンパイル時間 665 ms
コンパイル使用メモリ 87,152 KB
実行使用メモリ 71,728 KB
最終ジャッジ日時 2023-09-07 03:41:54
合計ジャッジ時間 5,108 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,248 KB
testcase_01 AC 72 ms
71,248 KB
testcase_02 AC 74 ms
71,300 KB
testcase_03 AC 72 ms
71,416 KB
testcase_04 AC 73 ms
71,252 KB
testcase_05 AC 71 ms
71,712 KB
testcase_06 AC 73 ms
71,560 KB
testcase_07 AC 72 ms
71,540 KB
testcase_08 AC 73 ms
71,404 KB
testcase_09 AC 74 ms
71,420 KB
testcase_10 AC 72 ms
71,728 KB
testcase_11 AC 72 ms
71,260 KB
testcase_12 AC 71 ms
71,324 KB
testcase_13 AC 71 ms
71,092 KB
testcase_14 AC 71 ms
71,296 KB
testcase_15 AC 72 ms
71,252 KB
testcase_16 AC 72 ms
71,252 KB
testcase_17 AC 72 ms
71,416 KB
testcase_18 AC 72 ms
71,608 KB
testcase_19 AC 71 ms
71,400 KB
testcase_20 AC 71 ms
71,296 KB
testcase_21 AC 72 ms
71,264 KB
testcase_22 AC 71 ms
71,524 KB
testcase_23 AC 69 ms
71,636 KB
testcase_24 AC 70 ms
71,296 KB
testcase_25 AC 70 ms
71,264 KB
testcase_26 AC 75 ms
71,400 KB
testcase_27 AC 72 ms
71,576 KB
testcase_28 AC 72 ms
71,400 KB
testcase_29 AC 70 ms
71,456 KB
testcase_30 AC 71 ms
71,244 KB
testcase_31 AC 74 ms
71,360 KB
testcase_32 AC 75 ms
71,452 KB
testcase_33 AC 74 ms
71,552 KB
testcase_34 AC 74 ms
71,692 KB
testcase_35 AC 73 ms
71,352 KB
testcase_36 AC 73 ms
71,256 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = lambda : sys.stdin.readline().rstrip()

sys.setrecursionlimit(2*10**5+10)
write = lambda x: sys.stdout.write(x+"\n")
debug = lambda x: sys.stderr.write(x+"\n")
writef = lambda x: print("{:.12f}".format(x))


n = int(input())
a,b,c = list(map(int, input().split()))
from math import gcd
ab = a*b//gcd(a,b)
bc = b*c//gcd(b,c)
ca = a*c//gcd(a,c)
abc = ab*c//gcd(ab,c)
ans = n//a + n//b + n//c - n//ab - n//bc - n//ca + n//abc
print(ans)
0