help
查看原帖
help
1053860
TiAmo_TerSempre楼主2023/12/4 21:43
#include <bits/stdc++.h>
using namespace std;

const int menology[13] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
int year, mouth;

int main() {
	cin >> year >> mouth;
	if (mouth == 2 and (year % 400 == 0 or year % 4 == 0))
		cout << 29;
	else
		cout << menology[mouth];
	return 0;
}

没分求解

2023/12/4 21:43
加载中...