求助
查看原帖
求助
1095322
mc_xiexie楼主2023/10/30 18:41

点五wa,80分

#include <bits/stdc++.h>
using namespace std;
int main()
{
   int a,b;
   cin>>a>>b;
   if(b==1||b==3||b==5||b==7||b==8||b==10||b==12)cout<<31;
   else if(b==4||b==6||b==9||b==11)cout<<3;
   else if(b==2){if(a==1700||a==1800||a==1900){cout<<28;}else if(a%4==0){cout<<29;}else if(a%4!=0){cout<<28;}}
}

2023/10/30 18:41
加载中...