Run ID:132061

提交时间: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; }