题解
2025-02-23 16:26:57
发布于:北京
1阅读
0回复
0点赞
#include <iostream>
using namespace std;
bool is_leap(int x){
if (!(x%4) && x%100 || !(x%400)) return 1;
else return 0;
}
int main(){
int n;
cin>>n;
if(is_leap(n)) cout<<"Y";
else cout<<"N";
return 0;
}
只需要在前面bool 一个函数,然后写判断条件就可以啦!
记得点赞!
这里空空如也
有帮助,赞一个