#include #define REP2(i,x,n) for(int i=x; i<(n); i++) using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(false); vector M{ 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; int count{}; REP2( i, 1, 12 ){ REP2( j, 1, M[i] + 1 ) { if( i == ( j % 10 ) + ( j / 10 ) ) { count++; } } } cout << count << endl; return 0; }