Project Euler Problem 099
import Data.List import Data.Ord import System.IO.Unsafe str :: String str = unsafePerformIO $ readFile "099base_exp.txt" list :: [([Integer], Integer)] list = zip (map (\x -> read ("["++x++"]") :: [Integer]) $ lines str) [1..] ans1imp :: ([Integer], Integer) ans1imp = maximumBy (comparing (\((a:b:_),n) -> (fromIntegral b)*log (fromIntegral a))) list ans1 = let (_,a) = ans1imp in a -- 709 main = print ans1