94求助
查看原帖
94求助
1059277
2013wjy楼主2024/8/24 18:31
#include<bits/stdc++.h>
using namespace std;
int a,b,c[100]={-1,31,28,31,30,31,30,31,31,30,31,30,31};
//             0   1  2  3  4  5   6  7  8  9  10  11 12
int main(){
	cin>>a>>b;
	if(a%100==0&&a%4==0){
		c[2]++;
	}else if(a%4==0){
		c[2]++;
	}
	cout<<c[b];
	return 0;
}
2024/8/24 18:31
加载中...