using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace No188 { public class Program { public static void Main(string[] args) { DateTime n = new DateTime(2015, 1, 1); DateTime end = new DateTime(2015, 12, 31); int count = 0; while(n <= end ) { var day = n.Day.ToString("00").ToArray().Select(s => int.Parse(s.ToString())).ToList(); if (n.Month == day[0] + day[1]) { count++; } n = n.AddDays(1); } Console.WriteLine(count); } } }