Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
54396 | zhangweiran | 判断闰年 | C++ | Accepted | 0 MS | 240 KB | 397 | 2024-10-27 16:31:45 |
#include <bits/stdc++.h> using namespace std; int main() { int a; cin >> a; if (a % 4 == 0) { if (a % 100 == 0) { if (a % 400 != 0) { cout << "N"; } else { cout << "Y"; } } else { cout << "Y"; } } else { cout << "N"; } return 0; }