1 solutions

  • 0
    @ 2025-12-1 8:32:39

    C++ :

    #include<bits/stdc++.h>
    using namespace std;
    int x,sum,max1;
    int main()
    {
    //	freopen("688.in","r",stdin);
    //	freopen("688.out","w",stdout);	
    	for(int i=0;i<6;i++)
    	{
    		cin>>x;
    		sum+=x;
    		max1=max(max1,x);
    	}
    	for(int i=max1+1;;i++)
    		if((sum+i)%7==0) {cout<<i;return 0;	}
        return 0;
    }
    
    
    • 1

    Information

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