Egyptian fraction by ush

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

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

download

return to the top page