Egyptian fraction by inaniwa

long long x,y;main(t,u){for(;~scanf("%lld/%lld =",&x,&y);)for(vprintf();u=y%x,printf(" 1/%d%s",t=y/x+!!u,u?" +":"\n"),u;y*=t)x-=u;}

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

download

return to the top page