Project Euler #5: Smallest multiple

  • + 0 comments

    import sys

    import math

    for _ in range(int(input())): x = int(input()) result = 1 for i in range(1, x + 1): result = result * i // math.gcd(result, i) print(result)