Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
7682 黄宜洋 [在线测评解答教程] 闰年 C++ Accepted 9 MS 264 KB 641 2025-05-12 17:35:03

Tests(11/11):


Code:

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; bool years(int x){ if(x%400!=0&&x%100==0){ return false; } else{ if(x%4==0||x%400==0){ return true; } else{ return false; } } } int main(){ int l,t; cin>>l; for(int i=1;i<=l;i++){ cin>>t; if(years(t)) cout<<"Yes"<<endl; else cout<<"No"<<endl; } return 0; }