Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
89674 | 黄睿杰 | 闰年的数量 | C++ | Accepted | 1 MS | 272 KB | 241 | 2024-08-28 19:30:44 |
#include<iostream> using namespace std; bool c(int n){ if(n%4==0&&n%100!=0||n%400==0) return true; else return false; } int main(){ int a,b,s=0; cin>>a>>b; for(int i=a;i<=b;i++){ if(c(i)) s++; } cout<<s; return 0; }