Run ID:149022
提交时间:2026-03-06 18:29:48
#include <iostream> using namespace std; int main() { int n; cin >> n; if (n < 1 || n > 12) { cout << "Invalid." << endl; } else if (n == 2) { cout << 29 << endl; } else if (n == 4 || n == 6 || n == 9 || n == 11) { cout << 30 << endl; } else { cout << 31 << endl; } return 0; }