1 #include<iostream>
2 using namespace std;
3
4 #define LEAP_YEAR(y) (y%4==0&&y%100!=0 || y%400==0) ? 1:0;
5
6 int main()
7 {
8 int y;
9 cin>>y;
10 int RES=LEAP_YEAR(y);
11 if(RES)cout<<"Y"<<endl;
12 else cout<<"N"<<endl;
13 }
原文:http://www.cnblogs.com/AllenDuane/p/3748260.html