Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
115447 王珠潏 闰年的数量 C++ Accepted 1 MS 272 KB 277 2025-03-30 14:42:15

Tests(10/10):


Code:

#include<bits/stdc++.h> using namespace std; bool rn(int x){ if(x%400==0 || (x%4==0 && x%100!=0)){ return true; } return false; } int main(){ int x,y,sum=0; cin>>x>>y; for(int i=x;i<=y;i++){ if(rn(i)){ sum++; } } cout<<sum; return 0; }