Number guess 1000 by *yuko*

begin repeat var m,n,x:real=0;read(n);x:=500;repeat m:=int(m+ord(m<n)*2*x-x+0.5);writeln(m:0:0,chr(61-ord(m<n)+ord(m>n)):2);x:=x/2until m=n;writeln until 0>0end.

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

download

return to the top page