AC
2025-04-14 16:39:06
发布于:浙江
2阅读
0回复
0点赞
#include<iostream>
using namespace std;
// 完成闰年判定 is_leap 函数
bool is_leap(int n){
if(n%40&&n%100!=0||n%4000) return true;
return false;
}
int main() {
int n;
cin >> n;
if(is_leap(n)) cout << "Y" << endl;
else cout << "N" << endl;
return 0;
}
这里空空如也
有帮助,赞一个