Skip to content

Instantly share code, notes, and snippets.

@theburningmonk
Created September 7, 2011 00:23
Show Gist options
  • Save theburningmonk/1199393 to your computer and use it in GitHub Desktop.
Save theburningmonk/1199393 to your computer and use it in GitHub Desktop.
ProjectEuler - Problem 99 Solution
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