Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
7407 黄宜洋 闰年的数量 C++ Wrong Answer 0 MS 264 KB 626 2025-04-21 18:14:26

Tests(0/10):


Code:

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; bool years(int x){ if(x%400==0){ return false; } else{ if(x%4==0){ return true; } else{ return false; } } } int main(){ int x,y,ans=0; cin>>x>>y; for(int i=x-4;i<=y;i++){ if(years(i)){ ans++; } } cout<<ans<<endl; return 0; }


Run Info:

------Input------
507 2591
------Answer-----
506
------Your output-----
517