Skip to content

Instantly share code, notes, and snippets.

@pbevin
Created April 23, 2015 01:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pbevin/f42c30ff28f085ac3b11 to your computer and use it in GitHub Desktop.
Save pbevin/f42c30ff28f085ac3b11 to your computer and use it in GitHub Desktop.
q,r,t,k,n = 1,0,1,1,2,3
loop do
if 2*q+r-t < n*t
print n
q,r,t,k,n = 10*q,10*(r-n*t),t,k,(10*(q+r))/t-10*n
else
r,t,k,n = (q+r)*k, t*k, k+1, (q+r*k)/(t*k)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment