Prime Substrings by henkma(oerjan)

m@main=do
s<-getLine;putStrLn$do n<-zipWith(++)`scanl1`scanr((:).(:[]))[]s>>=map read;show$product[2..n-2]^2`mod`max 1n
m

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

download

return to the top page