Run ID:149414

提交时间:2026-03-12 12:40:22

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