log by pascal

m,n=gets.split.map{|x|s=$z=10**?p;a=d=0;a+=(s-=s/x.to_i)/(d+=1)while s>d;a};r=m*$z/n;$><<[m/n,".",r.to_s[r%2,?d]]

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

download

return top