prods = [a*b | a <- numbers, b <- numbers] where numbers = [1..100]stats = map (\d -> (d, length $ filter (\p -> p `mod` d == 0) prods)) [1..10]main = print stats
Standard input is empty
[(1,10000),(2,7500),(3,5511),(4,5000),(5,3600),(6,4100),(7,2604),(8,3075),(9,2563),(10,2700)]
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!