Elias delta to Fibonacci by 51b

let rec s()=Scanf.scanf"%c"Char.code and f n=f(match s()with 48->n+1|49->let
p,q=h(g(g n-1))2 1in print_string p;0|_->print_newline();0)and g a=if a=0then
1else s()/49+2*g(a-1)and h n m l=let s,p=if m>n then"1",n else(h n(m+l)m)in if
l>p then"0"^s,p else"1"^s,p-l;;f 0

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


return to the top page