1 solutions

  • 0
    @ 2025-12-3 8:31:38

    C++ :

    #include<bits/stdc++.h>
    using namespace std;
    int n,s;
    int main()
    {   
        cin>>n;
    	int ans=n/5*2;
    	if(n%5==4) ans+=2;
    	else if(n%5==1 || n%5==2 || n%5==3) ans++;
    	cout<<ans;
        return 0;
    }
    
    • 1

    Information

    ID
    750
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    10
    Tags
    # Submissions
    3
    Accepted
    3
    Uploaded By