Skip to content

Instantly share code, notes, and snippets.

@vexorian
Created May 20, 2015 06:10
Show Gist options
  • Save vexorian/bedafd7e1baf9d057f95 to your computer and use it in GitHub Desktop.
Save vexorian/bedafd7e1baf9d057f95 to your computer and use it in GitHub Desktop.
first 100 fibonacci numbers
def fibo():
A = [
[ 0, 1 ],
[ 1, 1 ],
]
x = [0, 1]
for i in range(100):
print x[0]
y = [0, 0]
(x[0], x[1]) = x[0] * A[0][0] + x[1] * A[0][1], x[0] * A[1][0] + x[1] * A[1][1]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment