题解
2025-03-25 18:04:44
发布于:广东
0阅读
0回复
0点赞
#include<iostream>
using namespace std;
// 完成闰年判定 is_leap 函数
int is_leap(int a){
if(a%4==0&&a%100!=0||a%400==0)return 1;
else return 0;
}
int main() {
int n;
cin >> n;
if(is_leap(n)) cout << "Y" << endl;
else cout << "N" << endl;
return 0;
}
这里空空如也
有帮助,赞一个