#include #include #include #include using namespace std; int main() { int x, y, day; int cnt = 0; for (int x = 1; x <= 12; x++) { switch (x) { case 1: case 3: case 5: case 7: case 8: case 10: case 12: day = 31; break; case 2: day = 28; break; case 4: case 6: case 9: case 11: day = 30; break; default: return 1; } for (int y = 1; y <= day; y++) { if (x == (y / 10 + y % 10)) { // cout << x << "月" << y << "日" << endl; cnt++; } } } cout << cnt << endl; return 0; }