| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 65442 | 谢绍澜 | 闰年的数量 | C++ | Accepted | 2 MS | 272 KB | 371 | 2024-01-25 19:12:49 |
#include<iostream> #include<cmath> using namespace std; int a(int n){ if(n%400==0) return 1; else{ if(n%4==0){ if(n%100!=0) return 1; } else return 0; } } int main() { int b,c,d=0; cin>>b>>c; for(int i=b;i<=c;i++){ d+=a(i); } cout<<d; }