提交时间:2022-11-03 21:15:14

运行 ID: 62154

#include<bits/stdc++.h> using namespace std; int main(){ int n,m; cin>>n>>m; if(n%4!=0&&m==2){ cout<<"28"; } else{ cout<<"29"; } if(m!=2&&m<7&&m%2==0){ cout<<"30"; } if(m==7||m==8){ cout<<"31"; } if(m>8&&m%2!=0){ cout<<"30"; } else{ cout<<"31"; } return 0; }