Elias delta to Fibonacci by 51b

import std.stdio;int n,c;char[]f(int x,int y){auto s=n<y?"1":f(y,x+y);return(n>=x?n-=x,"1":"0")~s;}void g(int x){for(n=1;x--;n+=getchar%2)n*=2;}void main(){for(;~(c=getchar);)write(c%2?g=n,g=n-1,f(1,2):c%5?n++,"":\n);}

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

download

return to the top page