样例过了,为什么还不行?
查看原帖
样例过了,为什么还不行?
1380501
Im_a_big_SB楼主2024/8/24 09:05
#include<iostream>
using namespace std;
int main(){
	int a,b;
	cin>>a>>b;
	if(b==(1||3||5||7||8||10||12)){
		cout<<"31";
	}else if(b==(4||6||9||11)){
		cout<<"30";
	}else{
		if((a%4==0)||(a%100&&a%400==0)){
			cout<<"29";
		}else{
			cout<<"28";
		}
	}
	return 0;
}
2024/8/24 09:05
加载中...