Guest User

Untitled

a guest
Dec 12th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. import Data.List
  2.  
  3. solve = maximum $ concatMap solve' [2..9]
  4. solve' n = filter is $ map (flip cp [1..n]) [1..10^(9 `div` n + 1)]
  5. is = (== "123456789") . sort
  6. cp x = concatMap (show . (*x))
  7.  
  8. main = putStrLn solve
Add Comment
Please, Sign In to add comment