Cancel fractions by

main(g,a,b){for(;~scanf("%d/%d\n",&a,&b);printf(""-6+g/b*3,a/g,b/g))for(g=a;a%g+b%g;g--);}

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

download

return to the top page