Run ID:147813

提交时间:2026-02-07 23:07:47

#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; }