Run ID:63080
提交时间:2024-01-05 20:02:48
#include <iostream> #include<vector> using namespace std; bool checkR(int year) { if (year % 4) return false; if (year % 100 == 0 && year % 400 != 0) return false; return true; } int main() { int n; int b; while (cin >> n) { vector<string> a; for (int i = 0; i < n; ++i) { cin >> b; if (checkR(b)) a.push_back("Yes"); else a.push_back("No"); } for (auto k : a) { cout << k << endl; } } return 0; }