initial commit
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
module _22
|
||||
|
||||
open System.IO
|
||||
|
||||
let nameScores =
|
||||
let names =
|
||||
File.ReadAllLines(@"22_names.txt")
|
||||
|> Seq.collect (fun l -> l.Split(','))
|
||||
|> Seq.map (fun w -> w.Substring(1, w.Length - 2))
|
||||
|> Seq.sort
|
||||
names
|
||||
|> Seq.mapi (fun i name -> (i + 1) * common.wordValue name)
|
||||
|> Seq.sum
|
||||
Reference in New Issue
Block a user