14 条题解

  • 0
    @ 2026-11-1 18:17:10
    #include<bits/stdc++.h>
    using namespace std;
    int a[15] = {0,31,28,31,30,31,30,31,31,30,31,30,31};
    int main() {
    	long long x,y;
    	cin >> x >> y ;
    	if(x % 4 != 0 || (x % 100 == 0 && x % 400 != 0)) {
    		cout<<a[y];
    	}
    	else {
    		if(y != 2) cout<< a[y] ;
    		else cout<< 29 ;
    	}
    }
    

    信息

    ID
    863
    时间
    1000ms
    内存
    256MiB
    难度
    6
    标签
    递交数
    955
    已通过
    319
    上传者