1 solutions

  • 0
    @ 2025-12-3 17:21:29

    C++ :

    #include<bits/stdc++.h>
    using namespace std;
    long long n,ans;
    int main()
    {
    	cin>>n;
    	if(n<=4) {cout<<32;return 0;}
    	long long x=n/6,y=n%6;
    	if(y==0) ans=x*36;
    	else{
    		if(y==1 || y==2) ans=(x-1)*36+64;
    		else if(y==3 || y==4) ans=x*36+32;
    			else ans=(x+1)*36;
    	}
        cout<<ans; 
        return 0;
    }
    
    • 1

    Information

    ID
    993
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    10
    Tags
    # Submissions
    1
    Accepted
    1
    Uploaded By