using System; using System.Linq; using System.Collections.Generic; using System.Text.RegularExpressions; class Program { static void Main() { var month = new List() { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }; var _ans = 0; for (var i = 0; month.Count > i; i++) { foreach (var j in Enumerable.Range(1, 31)) { var s = j.ToString(); if (s.Length == 1) { if (j == month[i]) _ans++; } else { int a = (int)char.GetNumericValue(s[0]); int b = (int)char.GetNumericValue(s[1]); if (a + b == month[i]) _ans++; } } } Console.WriteLine(_ans - 1); } }