#include using namespace std; int main() { int month[12] = { 31,28,31,30,31,30,31,31,30,31,30,31 }; int mon; int x, y,sum; int ans = 0; for (mon = 0; mon < 12; mon++) { for (x = 0; x <= month[mon]/10; x++) { for (y = 0; y < 10; y++) { if (month[mon]/10 == x && y > month[mon]%10) { break; } if (mon + 1 == x + y) { cout << x << ' ' << y << endl; ans++; } } } } cout << ans << endl; }