为 什 么 只 有 34 分
查看原帖
为 什 么 只 有 34 分
1364707
cys123楼主2024/6/16 20:07
```cpp
#include<iostream>
using namespace std;
int main(){
    int a,b;
    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;
    }
    if(b==4 or b==6 or b==9 or b==11){
        cout<<30;
    }
    if(a%400==0 or (a%4==0 and a%100!=0)){
        cout<<29;
    }else{
        cout<<28;
    }
    return 0;
}
```
2024/6/16 20:07
加载中...