Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
117213 | 杨登博 | 闰年的数量 | C++ | Accepted | 2 MS | 272 KB | 495 | 2025-04-14 20:57:25 |
#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 x){ if(x%4==0&&x%100!=0||x%400==0) return true; return false; } int main(){ int b,c,sum=0; cin>>b>>c; for(int i=b;i<=c;i++){ if(a(i)) sum++; } cout<<sum; return 0; }