Run ID:108931

提交时间:2025-01-23 16:41:15

#include <iostream> using namespace std; bool isLeapYear(int year) { if (year % 400 == 0) return true; if (year % 100 == 0) return false; return (year % 4 == 0); } int main() { int t; cin >> t; // 读取测试样例的数量 while (t--) { int n; cin >> n; // 读取年份 if (isLeapYear(n)) { cout << "Yes" << endl; } else { cout << "No" << endl; } } return 0; }