Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function perform(n)
- local bmax = math.floor(log(3,n))
- local cmax = math.floor(log(5,n))
- for c = 0, cmax do
- for b = 0, bmax do
- local a = 0
- while 2^a*3^b*5^c < n do
- print(2^a*3^b*5^c, a, b, c)
- a = a + 1
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement