Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
118578 | 唐安轩 | 闰年的数量 | C++ | Accepted | 1 MS | 276 KB | 248 | 2025-05-05 11:46:45 |
#include<bits/stdc++.h> using namespace std; int sd(int x,int y){ int a=0; for(int i=x;i<=y;i++){ if(i%4==0&&i%100!=0||i%400==0){ a++; } } return a; } int main(){ int x,y; cin>>x>>y; cout<<sd(x,y)<<endl; return 0; }