Advertisement
Guest User

Untitled

a guest
Oct 20th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.27 KB | None | 0 0
  1. function perform(n)
  2.   local bmax = math.floor(log(3,n))
  3.   local cmax = math.floor(log(5,n))
  4.   for c = 0, cmax do
  5.     for b = 0, bmax do
  6.       local a = 0
  7.       while 2^a*3^b*5^c < n do
  8.         print(2^a*3^b*5^c, a, b, c)
  9.         a = a + 1
  10.       end
  11.     end
  12.   end
  13. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement