open System type Sol() = member this.Solve() = let happyDays m ds = ds |> Seq.filter (fun d -> ((d%10) + (d/10)) = m ) |> Seq.length let y2015 = [ (1,[1..31]); (2,[1..28]); (3,[1..31]); (4,[1..30]); (5,[1..31]); (6,[1..30]); (7,[1..31]); (8,[1..31]); (9,[1..30]); (10,[1..31]); (11,[1..30]); (12,[1..31]) ] y2015 |> Seq.sumBy (fun (m,ds) -> happyDays m ds ) |> printfn "%d" let mySol = new Sol() mySol.Solve()