#include #define REP(i, a, b) for (int i = (a); i < (b); i++) #define dump(s) cerr << __LINE__ << "\t:" << #s << " = " << (s) << endl \ using namespace std; int main () { int dlist[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; int ans = 0; REP (i, 0, 12) { int month = i + 1; REP (date, 1, dlist[i] + 1) { if ((date % 10) + (date / 10) == month) { ans++; // dump(date); // dump(month); } } } cout << ans << endl; return 0; }