結果

問題 No.316 もっと刺激的なFizzBuzzをください
ユーザー tcltktcltk
提出日時 2021-07-02 17:28:32
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 236 ms / 1,000 ms
コード長 521 bytes
コンパイル時間 291 ms
コンパイル使用メモリ 87,228 KB
実行使用メモリ 89,436 KB
最終ジャッジ日時 2023-09-11 11:25:30
合計ジャッジ時間 11,685 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 236 ms
89,408 KB
testcase_01 AC 228 ms
89,140 KB
testcase_02 AC 228 ms
89,160 KB
testcase_03 AC 224 ms
89,144 KB
testcase_04 AC 223 ms
89,104 KB
testcase_05 AC 227 ms
89,388 KB
testcase_06 AC 226 ms
89,156 KB
testcase_07 AC 227 ms
89,144 KB
testcase_08 AC 224 ms
89,100 KB
testcase_09 AC 223 ms
89,244 KB
testcase_10 AC 226 ms
89,436 KB
testcase_11 AC 226 ms
89,168 KB
testcase_12 AC 227 ms
89,252 KB
testcase_13 AC 225 ms
89,264 KB
testcase_14 AC 224 ms
89,132 KB
testcase_15 AC 223 ms
89,324 KB
testcase_16 AC 225 ms
89,404 KB
testcase_17 AC 225 ms
89,116 KB
testcase_18 AC 224 ms
89,340 KB
testcase_19 AC 228 ms
89,424 KB
testcase_20 AC 230 ms
89,032 KB
testcase_21 AC 224 ms
89,388 KB
testcase_22 AC 226 ms
89,268 KB
testcase_23 AC 223 ms
89,112 KB
testcase_24 AC 219 ms
89,120 KB
testcase_25 AC 218 ms
89,388 KB
testcase_26 AC 219 ms
89,368 KB
testcase_27 AC 222 ms
89,228 KB
testcase_28 AC 222 ms
89,044 KB
testcase_29 AC 222 ms
89,124 KB
testcase_30 AC 221 ms
89,396 KB
testcase_31 AC 221 ms
89,268 KB
testcase_32 AC 221 ms
89,312 KB
testcase_33 AC 225 ms
89,036 KB
testcase_34 AC 227 ms
89,132 KB
testcase_35 AC 223 ms
89,272 KB
testcase_36 AC 223 ms
89,280 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python3
# from typing import *

import sys
import io
import math
import collections
import decimal
import itertools
import bisect
import heapq


def input():
    return sys.stdin.readline()[:-1]


# sys.setrecursionlimit(1000000)

# _INPUT = """100
# 2 3 5
# """
# sys.stdin = io.StringIO(_INPUT)

def lcm(n1, n2):
    return n1 * n2 // math.gcd(n1, n2)

N = int(input())
a, b, c = map(int, input().split())
ans = N//a + N//b + N//c - N//lcm(a,b) - N//lcm(b,c) - N//lcm(a,c) + N//lcm(a,lcm(b,c))
print(ans)
0