Cancel fractions by nai

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

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

download

return to the top page