78求教
查看原帖
78求教
1415312
wimol楼主2024/9/26 21:32
#include<bits/stdc++.h>
using namespace std;
long long a,b;
int main(){
	cin>>a>>b;
	int c[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
	if(b==2){
		if((a%4==0&&a%100!=0) || (a%400==0))
        	cout<<"29";}
	else cout<<c[b];
	return 0;
}
2024/9/26 21:32
加载中...