Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
131513 李朋秦 闰年的数量 C++ Accepted 2 MS 272 KB 280 2025-09-27 14:24:33

Tests(10/10):


Code:

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