Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
49425 | 姜学士 | C语言5.5 | C++ | Accepted | 1 MS | 264 KB | 338 | 2023-07-04 01:09:49 |
#include<iostream> using namespace std; bool isLeapYear(int year){ if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0) { return true; } else { return false; } } int main() { int year; cin >> year; if (isLeapYear(year)) { cout << "leap year" << endl; } else { cout << "not leap year" << endl; } return 0; }