Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
67546 | sh25_ganzy | [在线测评解答教程] 闰年 | C++ | 通过 | 1 MS | 252 KB | 668 | 2025-09-19 17:38:26 |
#include<bits/stdc++.h> using namespace std; int main(){ int t; cin>>t; int year[t]; bool r; for(int i=0;i<t;i++){ cin>>year[i]; } for(int i=0;i<t;i++){ if(year[i]%4==0){ if(year[i]%100==0){ if(year[i]%400==0){ r=1; }else{ r=0; } }else{ r=1; } }else{ r=0; } if(r==0){ cout<<"No"; }else{ cout<<"Yes"; } if(i!=t-1){ cout<<endl; } } return 0; }