1 solutions

  • 0
    @ 2025-12-3 16:12:49

    C++ :

    #include<bits/stdc++.h>
    using namespace std;
    int a,b;
    int main()
    {
    //	freopen("1.in","r",stdin);
    //	freopen("1.out","w",stdout);
    	cin>>a>>b;
    	a--; 
    	int s1=a/4-a/100+a/400;
    	int s2=b/4-b/100+b/400;
    	cout<<s2-s1;
    	return 0;
    }
    
    • 1

    Information

    ID
    834
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    10
    Tags
    # Submissions
    8
    Accepted
    5
    Uploaded By