Egyptian fraction by clock

for(;r=readline();print(r.replace('+','=')))for([a,b]=r.split('/');r+=' + 1/'+(c=1+(b-1)/a|0),a=a*c-b;)b*=c

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

download

return to the top page