Cancel fractions by pooq

File standardInput readLines map(split("/")map(asNumber)do(c:=a:=at(0);d:=b:=last;while(d>0,t:=c%d;c=d;d=t);writeln(a/c,if(b/c>1,"/".. b/c,""))))

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

download

return to the top page