Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
126349 | 蔡书涵 | 闰年的数量 | C++ | Accepted | 1 MS | 272 KB | 354 | 2025-07-17 17:22:22 |
#include<bits/stdc++.h> using namespace std; bool rn(int y){ if((y%4==0&&y%100!=0)||y%400==0){ return true; } else{ return false; } } int main(){ int s=0; int x,y; cin>>x>>y; for(int i=x;i<=y;i++){ if(rn(i)==true){ s++; } } cout<<s; return 0; }