提交时间:2025-09-17 17:44:03

运行 ID: 67385

#include <iostream> using namespace std; bool isLeapYear(int year) { if (year % 4 != 0) { return false; } else if (year % 100 != 0) { return true; } else if (year % 400 == 0) { return true; } else { return false; } } int main() { int t; cin >> t; while (t--) { int n; cin >> n; if (isLeapYear(n)) { cout << "Yes" << endl; } else { cout << "No" << endl; } } return 0; }