Run ID:4128
提交时间:2024-08-04 01:24:32
#include <iostream> using namespace std; int main() { int t, n; cin >> t; int years[MAX_YEARS]; for (int i = 0; i < t; i++) { cin >> years[i]; } for (int i = 0; i < t; i++) { if ((years[i] % 400 == 0) || (years[i] % 4 == 0 && years[i] % 100 != 0)) { cout << "YES" << endl; } else { cout << "NO" << endl; } } return 0; }