System.in.eachLine{int a=500 b=250 for(d=1;d;b/=2){d=it as int<=>a printf"$a %c\n%s",61-d,d?'':'\n' a+=d*b+0.5}}
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page