using System; public class Test { public static void Main() { int ans = 0; for (var dt = new DateTime(2015, 1, 1); dt.Year == 2015; dt = dt.AddDays(1)) { if (dt.Day / 10 + dt.Day % 10 == dt.Month) { ++ans; } } Console.WriteLine(ans); } }