代码如下:
#include<bits/stdc++.h>
using namespace std;
int main()
{
int b;
double a;
cin>>a>>b;
if(b==1 or b==3 or b==5 or b==7 or b==8 or b==10 or b==12)
{
cout<<31;
return 0;
}
if(b!=2)
{
cout<<30;
return 0;
}
if(a/4==int(a/4)) cout<<29;
else cout<<28;
return 0;
}
就一个蒟蒻,亲喷,80分
题目连接:https://www.luogu.com.cn/problem/P5716