3036 判断闰年
#include<bits/stdc++.h> #define f(i,s,e) for(int i = s; i <= e; i++) #define ll long long using namespace std; const int N = 1e3+10,inf = 0x3f3f3f3f; int main() { int year; cin >> year; //能被4整除,但不能被100整除 if(year % 4 == 0 && year % 100 != 0) cout << "YES"; else if(year % 400 == 0) //或者能被400整除 cout << "YES"; else cout << "NO"; return 0; }