Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
65 Benson 闰年的数量 C++ Accepted 0 MS 256 KB 363 2022-07-19 02:12:48

Tests(10/10):


Code:

#include<iostream> #include<cmath> using namespace std; bool rn(int a) { if(a%400==0||a%100!=0&&a%4==0) { return true; } else return false; } int main(){ int n,m,c=0; cin>>n>>m; for(int i=n;i<=m;i++) { if(rn(i)) { c++; } } cout<<c; return 0; }