| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 154138 | 唐诗阳 | 闰年的数量 | C++ | Accepted | 1 MS | 272 KB | 511 | 2026-05-24 15:30:59 |
#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 r(int n){ if(n%4==0 && n%100!=0 || n%400==0){ return 1; } else{ return 0; } } int main(){ int x,y,s=0; cin>>x>>y; for(int i=x;i<=y;i++){ if(r(i)==1) s+=1; } cout<<s; return 0; }