Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
140640 李亭绪 [在线测评解答教程] 闰年 C++ Accepted 1 MS 276 KB 462 2025-12-18 19:13:23

Tests(11/11):


Code:

#include <iostream> using namespace std; bool isLeapYear(int year) { if (year % 4 == 0) { if (year % 100 == 0) { return year % 400 == 0; } return true; } return false; } int main() { int t; cin >> t; while (t--) { int n; cin >> n; if (isLeapYear(n)) { cout << "Yes" << endl; } else { cout << "No" << endl; } } return 0; }