球球大佬帮帮萌新@@帮我康康哪里错了啊?
查看原帖
球球大佬帮帮萌新@@帮我康康哪里错了啊?
415866
NEVERMORE_X楼主2020/12/7 21:35
#include<bits/stdc++.h>
using namespace std;
int main()
{
	int a,b;
	scanf("%d %d",&a,&b);
	if(a%4==0 and a%100!=0 or a%100==0)
		{if(b==1 or 3 or 5 or 7 or 8 or 10 or 12)
			{printf("31");}
		else if(b==4 or 6 or 9 or 11)
			{printf("30");}
		else(b==2);
			{printf("29");}}
	else
	{if(b==1 or 3 or 5 or 7 or 8 or 10 or 12)
			{printf("31");}
		else if(b==4 or 6 or 9 or 11)
			{printf("30");}
		else(b==2);
			{printf("28");}}
		return 0;
}
2020/12/7 21:35
加载中...