Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
145395 徐毅然 08有几个闰年 C++ Accepted 0 MS 272 KB 356 2026-01-25 15:05:05

Tests(10/10):


Code:

#include<bits/stdc++.h> using namespace std; bool it(int year) { return (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0); } int main() { int a, b, c; cin >> a >> b >> c; int count = 0; if (it(a)) count++; if (it(b)) count++; if (it(c)) count++; cout << count << endl; return 0; }