| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 164653 | 陈开远 | 09闰年第n个月有多少天 | C++ | Accepted | 1 MS | 272 KB | 538 | 2026-11-06 21:21:40 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() #include <iostream> using namespace std; int main() { int n; cin >> n; if (n < 1 || n > 12) { cout << "Invalid." << endl; return 0; } const int leap_year_days[] = {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; cout << leap_year_days[n] << endl; return 0; }