Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
117211 郝王骏程 闰年的数量 C++ Compile Error 0 MS 0 KB 492 2025-04-14 20:52:17

Tests(0/0):


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 a(int y){ if(j%4==0&&j%100!=0||j%400==0) return true; return false; } int main(){ int x,y,s=0; cin>>x>>y; for(int i=x;i<=y;i++){ if(a(i)){ s++; } } cout<<s; return 0; }


Run Info:

Main.cc: In function 'bool a(int)':
Main.cc:8:8: error: 'j' was not declared in this scope
     if(j%4==0&&j%100!=0||j%400==0)
        ^