ACGO Windows 11 来了
2026-02-14 12:16:35
发布于:广东
0阅读
0回复
0点赞
#include <iostream>
using namespace std;
bool is_leap(int a){
if(a % 100 == 0){
if(a % 400 == 0){
return true;
}else{
return false;
}
}else{
if(a % 4 == 0){
return true;
}else{
return false;
}
}
}
int main() {
int n;
cin >> n;
if(is_leap(n)) cout << "Y" << endl;
else cout << "N" << endl;
return 0;
}
这里空空如也

有帮助,赞一个