#include using namespace std; int a[] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; int main(){ int ans = 0; for(int i=1;i<13;i++){ for(int j=1;j<=a[i];j++){ if(i == (j%10 + j/10)){ cout << i << " " << j << endl; ans++; } } } cout << ans << endl; }