#include #include #include #include #include using namespace std; const int SIZE = 13; const int days[SIZE] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; int calc(int n) { return n / 10 + n % 10; } int main() { int happy = 0; for (int i = 1; i < SIZE; i++) { int val_m = calc(i); for (int j = 1; j <= days[i]; j++) { if (calc(j) == val_m) { happy++; // printf("%02d/%02d\n", i, j); } } } cout << happy << endl; return 0; }