Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
67385 jdf25_wangchs [在线测评解答教程] 闰年 C++ 通过 1 MS 252 KB 538 2025-09-17 17:44:03

Tests(11/11):


#include <iostream> using namespace std; bool isLeapYear(int year) { if (year % 4 != 0) { return false; } else if (year % 100 != 0) { return true; } else if (year % 400 == 0) { return true; } else { 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; }


测评信息: