Elias delta to Fibonacci by yowa

while(l=readline(s='')){p=0
while(l[p]){for(n=q=0;l[p]-1;q++)p++
for(;q-->=0||(q+2?--m:(m=n-1,n=1,m));)n=(l[p++]|0)+n*2
for(f=[],a=b=1;b<=n;f.push(a=b),b+=c)c=a
for(o=[];v=f.pop();)o.unshift(n<v?0:(n-=v,1))
s+=o.join('')+1}
print(s)}

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page