提交时间:2023-10-19 15:44:49
运行 ID: 28680
#include <iostream> using namespace std; int main() { int t, i, y, year[100]; cin >> t; for (i = t; i > 0; i--) { cin >> year[i]; } while (t) { y = year[t]; if (y % 4 == 0) { if (y % 100 == 0) { if (y % 400 == 0) cout << "Yes" << endl; else cout << "No" << endl; } else cout << "Yes" << endl; } else cout << "No" << endl; t--; } }