Cancel fractions by *yuko*

var i,j,k:word;c:char;begin repeat read(i,c,j);k:=1;while k*i mod j>0do k:=k+1;writeln(k*i div j,copy(c+stringof(k),ord(k>1)))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