Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
60 | 邓小龙 | 闰年的数量 | C++ | Accepted | 0 MS | 260 KB | 351 | 2022-07-18 13:40:59 |
# include<stdio.h> # include<iostream> using namespace std; bool runnian(int x) { if(x%400==0||(x%100!=0&&x%4==0)) return true; else return false; } int main(){ int x,y,cnt=0; cin>>x>>y; for(int i=x;i<=y;i++) { if(runnian(i)) cnt++; } cout<<cnt; return 0; }