#include using namespace std; int main() { static const int days[] = { 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; int happyDays = 0; for (int month = 1; month <= 12; ++month) { for (int day = 1; day <= days[month]; ++day) { if (month == (day / 10) + (day % 10)) { ++happyDays; } } } cout << happyDays << endl; return 0; }