Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
139910 胡海峰老师 09闰年第n个月有多少天 C++ Accepted 0 MS 272 KB 240 2025-12-11 21:05:34

Tests(10/10):


Code:

#include <iostream> using namespace std; int main(){ int days[12]={31,29,31,30,31,30,31,31,30,31,30,31}; int d; cin>>d; if(d>=1 && d<=12) { cout << days[d-1]; } else{ cout << "Invalid."; } return 0; }