open System open System.IO let solve() = let dt = DateTime.Parse("2015/01/01") let rec countHappyDay (DT:DateTime) (c:int) = let m = DT.Month let d = DT.Day if m = 12 && d = 31 then c else let l, h = d % 10, (d / 10) % 10 let DT = DT.AddDays(1.) if l + h = m then countHappyDay DT (c+1) else countHappyDay DT c countHappyDay dt 0 |> printfn "%d" [] let main argv = solve() 0