help me!!!ce
查看原帖
help me!!!ce
1403662
_xjx_楼主2024/7/25 18:19
#include<bits/stdc++.h>
using namespace std;
int main(){
    int y,j,d,a;
    cin>>y>>j;
    if(y%4==0&&y%100!=0||y%400==0){
        a=1;
    }else{
        a=0;
    }
    if(j==1||j==3||j==5||j==7||j==8||j==10||j==12){
        cout<<"31";
    }else(j==2){
        if(a==1){
            cout<<"29";
        }else{
            cout<<"28";
        }
    }else{
        cout<<"30";
    }
    return 0;
}

CE!!!!!

2024/7/25 18:19
加载中...