提交时间:2023-04-29 18:40:30
运行 ID: 16080
#include<iostream> using namespace std; int main() { int n; cin>>n; int year[n]; for(int i=0;i<n;i++) { cin>>year[i]; } for(int i=0;i<n;i++) { if(year[i]%4==0) { if(year[i]%100==0) { if(year[i]%400==0) { cout<<"Yes"<<endl; } else { cout<<"No"<<endl; } } else { cout<<"Yes"<<endl; } } else { cout<<"No"<<endl; } } return 0; }