Project Euler #5: Smallest multiple

  • + 0 comments
    #!/bin/python3
    
    import sys
    
    
    t = int(input().strip())
    for a0 in range(t):
        n = int(input().strip())
        SM = 0
        c = 0
        while SM==0:
            c +=1
            for j in range(1, n+1):
                r = c/j
                if r % 1 == 0:
                    SM=c
                    continue
                else:
                    SM=0
                    break
        print(SM)