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