1 2 3 4 5
def f(i): a=b=1;r=[] while b<=i:a,b=b,a+b while i:r,a,b,i=[b]*(c:=b<=i)+r,b-a,a,i-b*c return r
post a comment