| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 132061 | 胡海峰老师 | 08有几个闰年 | C++ | Accepted | 2 MS | 272 KB | 456 | 2025-10-05 09:24:22 |
#include <iostream> using namespace std; // 判断闰年函数 bool isLeapYear(int year) { if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)) { return true; } return false; } int main() { int a, b, c; cin >> a >> b >> c; int count = 0; if (isLeapYear(a)) count++; if (isLeapYear(b)) count++; if (isLeapYear(c)) count++; cout << count << endl; return 0; }