You are viewing a single comment's thread. Return to all comments →
my code but biving one test case error.
import sys import math test_case = int(input().strip()) for a0 in range(test_case): rang = int(input().strip()) num = [] for i in range(1,rang+1): num.append(i) num.sort() lcm = math.lcm(num[0],num[1]) for i in range(2,len(num)): lcm = math.lcm(lcm,num[i]) print(lcm)
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 →
my code but biving one test case error.