Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
28680 | 闻航 | [在线测评解答教程] 闰年 | C++ | Accepted | 1 MS | 252 KB | 454 | 2023-10-19 15:44:49 |
#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--; } }