| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 64282 | 彭慕允 | 闰年的数量 | C++ | Accepted | 2 MS | 272 KB | 294 | 2024-01-21 12:02:05 |
#include<bits/stdc++.h> using namespace std; int rn(int n) { if(n%400==0||(n%4==0&&n%100 !=0)) { return 1; } else { return 0; } } int main() { int x ,y; int sum=0; cin>>x>>y; for(int i=x; i<=y; i++) { if(rn(i)==1) { sum++; } } cout<<sum; return 0; }