using System; using System.Collections.Generic; using System.Linq; namespace No188 { class MainClass { public static void Main (string[] args) { var pairs = new[]{ new Tuple(1,31), new Tuple(2,28), new Tuple(3,31), new Tuple(4,30), new Tuple(5,31), new Tuple(6,30), new Tuple(7,31), new Tuple(8,31), new Tuple(9,30), new Tuple(10,31), new Tuple(11,30), new Tuple(12,31) }; int total = 0; foreach (var keyValue in pairs) { var month = keyValue.Item1; for (int day = 1; day <= keyValue.Item2; day++) { int t = day % 10; int d = day / 10; int s = t + d; if (month == s) { total++; } } } Console.WriteLine (total.ToString ()); } } }