class Program { static void Main(string[] args) { int count = 0; for (int i = 1; i <= 12; i++) { for (int j = 1; j <= 31; j++) { if (j >= 10) { int oneDigits = j / 10; int twoDigits = j % 10; int sum = oneDigits + twoDigits; if (sum == i) { count++; } } else if (i == j) { count++; } } } Console.WriteLine(count); } }