我这个那错了,0分,讲懂关注
查看原帖
我这个那错了,0分,讲懂关注
1708577
huoduoteng楼主2025/6/15 20:30
#include<iostream>
using namespace std;
int main(){
    int A,B;
    cin>>A>>B;
    if(B==2||A % 400 == 0 || (A % 4 == 0 && A % 100 != 0)){
        cout<<29<<endl;
    }else{
        cout<<30<<endl;
    }
        if(B==1||B==3||B==5||B==7||B==8||B==10||B==12){
        cout<<31<<endl;
    }else{
        cout<<30<<endl;
    }
}
2025/6/15 20:30
加载中...