Run ID:126350
提交时间:2025-07-17 17:22:40
#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 rn(int y) { if ((y % 4 == 0 && y % 100 != 0) || y % 400 == 0) { return true; } else { return false; } } int main(){ int sum = 0; int x,y; cin >> x >> y; for (int i = x; i <= y; i++) { if (rn(i)) { sum++; } } cout << sum; return 0; }