Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
114587 罗迎甲 闰年的数量 C++ Accepted 1 MS 272 KB 459 2025-03-22 17:30:03

Tests(10/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 a1(int a2){ if(a2%4==0&&a2%100!=0||a2%400==0){ return true; } return false; } int main(){ int x,y,c=0; cin >> x >> y; for(int i=x;i<=y;i++){ if(a1(i)) c++; } cout<<c; return 0; }