Factorize me by sjoerd_visscher

m@main=do n<-readLn;putStrLn$n&"="++init(n#2);m
1#_=""
n#p|p*p>n=n&"*"
n#p=n!0where o!x|o`mod`p>0=x%p++o#(p+1);n!x=div n p!(x+1)
0%p=""
1%p=p&"*"
x%p=p&"^"++x&"*"
(&)=shows

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

download

return to the top page