Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- table={197248, 54480, 305745, 1329408, 4096, 524288, 1536, 196608, 2048,8192}
- function calculatelcm(table)
- for n=2,10000000 do -- 100M should be enough. it takes a while to calculate it though:-/
- correct=0
- for k,v in pairs(table) do
- if (n/k)%1 == 0 then correct=correct+1
- end
- if correct>=#table then print(n) break end
- end
- end
- end
- calculatelcm(table)
- print("done") -- just in case it doesn't output anything
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement