Reduce fractions by smkt

main(a,b,c){while(~scanf("%d/%d",&a,&b)){for(c=99;c>1;c--)!(a%c)&!(b%c)?a/=c,b/=c:0;printf("%d/%d\n",a,b);}}

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

download

return to the top page