Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
117210 | 黄枳润 | 闰年的数量 | C++ | Accepted | 1 MS | 280 KB | 487 | 2025-04-14 20:44:55 |
#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; int a(int a,int b){ int sum=0; for(int i=a;i<=b;i++){ if(i%4==0&&i%100!=0||i%400==0){ sum++; } } return sum; } int main(){ int x,y; cin>>x>>y; cout<<a(x,y)<<endl; return 0; }