Reduce fractions FIXED by notogawa

m@main=getLine>>=putStrLn.f.reads>>m
f[(a,c:x)]|b<-read x,g<-show.div(lcm a b)=g b++c:g a

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

download

return to the top page