Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
95183 | 倪士燊 | 闰年的数量 | C++ | Wrong Answer | 1 MS | 260 KB | 304 | 2024-10-27 09:40:36 |
#include<bits/stdc++.h> using namespace std; bool isRN(int year) { if(year%4==0 && year%100!=0 || year%400==0) { return 1; } return 0; } int main(){ int x,y,count=0; for(int i=x;i<=y;i++) { if(isRN(i)==1) { count++; } } cout<<count; return 0; }
------Input------
685 1586
------Answer-----
218
------Your output-----
1