Cancel fractions by rst76

import GHC.Real
m@main=getLine>>=putStrLn.(!show).read.map f>>m
n:%1!s=s n
n:%d!s=s n++'/':s d
f '/'='%'
f c=c

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

download

return to the top page