Created
October 1, 2010 11:59
-
-
Save oskimura/606108 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE NoMonomorphismRestriction #-} | |
module Euler24 where | |
import Data.List (permutations, sort) | |
listToDigit xs = sum $ zipWith (*) (reverse xs) (iterate (*10) 1) | |
euler24 = listToDigit . f $ lst | |
where | |
f = (!!(1000000-1)) . sort . permutations | |
lst = [0..9] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment