fork download
  1. {-# LANGUAGE NoMonomorphismRestriction #-}
  2. module Main where
  3. import Data.List.Ordered (minus)
  4. import Control.Monad (forM)
  5.  
  6. n = [0, 3, 5, 6]
  7. a = n ++ map (15 -) (reverse n)
  8. b = [0..15] `minus` a
  9.  
  10. main :: IO ()
  11. main
  12. = do
  13. putStrLn $ show a ++ " " ++ show b
  14. forM [0..3] $ \p -> do
  15. putStrLn $ show (sum $ map (^p) a) ++ "\t" ++ show (sum $ map (^p) b)
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.hs:3:8:
    Could not find module `Data.List.Ordered'
    Use -v to see a list of the files searched for.
stdout
Standard output is empty