提交时间:2026-01-04 14:34:14
运行 ID: 79651
#include <iostream> using namespace std; int main() { int t; // 测试样例组数 cin >> t; while (t--) { // 循环处理每一组数据 int year; cin >> year; // 应用闰年判断规则 if ((year % 400 == 0) || (year % 4 == 0 && year % 100 != 0)) { cout << "Yes" << endl; } else { cout << "No" << endl; } } return 0; }