Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
96809 | 夏梓瑞 | 闰年的数量 | C++ | Accepted | 1 MS | 272 KB | 547 | 2024-11-09 15:28:32 |
#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 q(int w){ if(w%4==0 && w%100!=0 || w%400==0) return true; return false; } int main(){ int a,b,sum=0; cin>>a>>b; for(int i=a;i<=b;i++){ if(q(i)){ sum++; } } cout<<sum; return 0; }