fork download
  1. import Data.List
  2. import Data.Function
  3.  
  4. isPrick :: Integer -> Bool
  5. isPrick = (== 1) . length . nubBy ((==) `on` (sort . show)) . flip map [1..6] . (*)
  6.  
  7. main :: IO ()
  8. main = print $ find isPrick [1..]
Success #stdin #stdout 4.75s 3592KB
stdin
Standard input is empty
stdout
Just 142857