Skip to content

Instantly share code, notes, and snippets.

@jchillerup
Created August 8, 2016 14:27
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 jchillerup/bd19b90d54634179773d43c1978868c9 to your computer and use it in GitHub Desktop.
Save jchillerup/bd19b90d54634179773d43c1978868c9 to your computer and use it in GitHub Desktop.
def y(x):
i = 0
while x > i:
i += 1
x -= i
return i-x, x
print(y(0))
print(y(1))
print(y(2))
print(y(3))
print(y(4))
print(y(5))
print(y(6))
print(y(7))
print(y(8))
print(y(9))
print(y(10))
print(y(9485935849484))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment