| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 67453 | 黎瑾萱 | 闰年的数量 | C++ | Accepted | 1 MS | 280 KB | 317 | 2024-03-16 15:44:38 |
#include<bits/stdc++.h> using namespace std; bool rn(int yaer){ if(yaer%4==0&&yaer%100!=0||yaer%400==0){ return 1; } else{ return 0; } } int main(){ int x,y,sum=0; cin>>x>>y; for(int i=x;i<=y;i++){ if(rn(i)){ sum++; } else{ continue; } } cout<<sum; return 0; }