Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
118591 王煜鑫 闰年的数量 C++ Accepted 1 MS 268 KB 310 2025-05-05 12:02:47

Tests(10/10):


Code:

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