注意那个exit(999)
#include<bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll n; cin>>n; if(n%100!=0){ if(n%4==0){ cout<<1; }else{ cout<<0; } exit(0); }else{ if(n%400==0){ cout<<1; exit(999); } } cout<<0; return 0; }