fork download
  1. isPrime n = fact !! (fromInteger (n-1)) `mod` n == n-1
  2.  
  3. fact = 1 : zipWith (*) fact [1..]
  4.  
  5. main = print . sum $ filter (not.isPrime) [1..10000]
Success #stdin #stdout 0.83s 89600KB
stdin
Standard input is empty
stdout
44268603