FRACTRAN fixed by m.ukai

let rec(^)?(c=input_byte stdin)l i=c=10&g!()!()(l@[i]);c=32&(l@[i])^0;l^i*10+c-48and g i n l=Printf.printf"%d
"n;g(i-i/i)(n$l)l
and($)n(a::b::l)=if n/b*b=n then n/b*a else n$l
and(!)=read_int;;[]^0

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

download

return to the top page