Created
September 7, 2011 00:23
-
-
Save theburningmonk/1199393 to your computer and use it in GitHub Desktop.
ProjectEuler - Problem 99 Solution
This file contains 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
open System.IO | |
let (answer, _) = | |
File.ReadAllLines(@"c:\temp\base_exp.txt") | |
|> Array.mapi (fun i l -> (i + 1, l.Split(',') |> Array.map float)) | |
|> Array.map (fun t -> match t with | (i, arr) -> (i, arr.[1] * (log arr.[0]))) | |
|> Array.maxBy (fun t -> match t with | (i, l) -> l) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment