Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
3057 | 孙浚轩 | 闰年的数量 | C++ | Accepted | 0 MS | 264 KB | 252 | 2024-03-30 17:50:14 |
#include<iostream> using namespace std; int isleap(int x){ if(x%4==0&&x%100!=0||x%400==0) return 1; else return 0; } int main(){ int x,y,res=0; cin>>x>>y; for(;x<=y;x++) res+=isleap(x); cout<<res; return 0; }