Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in 3rd party category for Fibonacci Spiral's End by kazuki.h
import numpy as np
def fibo_spiral_end(elem):
n1, n2, d, r = 0, 1, np.array([0, 0]), np.array([1, -1])
for _ in range(elem): n1, n2, d, r = n2, n1+n2, d+r*n2, np.dot([[0, -1], [1, 0]], r)
return d
Jan. 7, 2023
Comments: