Skip to content

Instantly share code, notes, and snippets.

@kristenmills
Created May 29, 2012 22:36
Show Gist options
  • Save kristenmills/2831200 to your computer and use it in GitHub Desktop.
Save kristenmills/2831200 to your computer and use it in GitHub Desktop.
Project Euler 69
def find_max limit=1000000
lst = prime_sieve 1000
n = 1
while n < limit
if lst[0]*n > limit
return n
end
n *= lst[0]
lst = lst.drop 1
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment