提交时间:2026-06-06 22:11:38

运行 ID: 443811

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