Guest User

Untitled

a guest
Jan 21st, 2018
78
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(permutations)
  2. import Data.List(sort)
  3.  
  4. result = head $ drop 999999 perms
  5. where perms = sort . map toNum . permutations
  6. $ [0..9]
  7. toNum = foldl1 (\acc x -> acc * 10 + x)
Add Comment
Please, Sign In to add comment