Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
139675 mww [在线测评解答教程] 闰年 C++ Accepted 1 MS 276 KB 467 2025-12-08 17:00:44

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; }