You are viewing a single comment's thread. Return to all comments →
Python 3:
#!/bin/python3 import sys def isDivisibleByAllNNumbers(num, n): for i in range(1, n+1): if (num % i != 0): return False return True t = int(input().strip()) for a0 in range(t): n = int(input().strip()) x = 1 while not isDivisibleByAllNNumbers(x, n): x += 1 print(x)
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #5: Smallest multiple
You are viewing a single comment's thread. Return to all comments →
Python 3: