Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
160367 Kevin 闰年的数量 C++ Accepted 1 MS 276 KB 318 2026-09-17 13:58:30

Tests(10/10):


Code:

#include<iostream> #include<iomanip> #include<cmath> using namespace std; bool rn(int n){ if((n%4==0&&n%100!=0)||(n%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)){ s++; } } cout<<s; return 0; }