Help me with the error

I am getting correct ans for my test case. But codechef compiler is giving time sigtstp error.



	int T,N,moves,minW;
	long sum = 0;
	cin >> T;
	
	for(int t=0; t<T; t++)
	{
	    cin >> N;
	    vector<int> W(N);
	    
	    for(int i=0; i<N; i++)
	        {
	            cin >> W[i];
	            sum += W[i];
	        }
	    
	    minW = *min_element(W.begin(),W.end());
	    
	    moves= sum -N*minW;
	    cout <<moves << endl;
	}
	
	return 0;
}

Did you make a submission or just ran it on the Codechef IDE? I assume you ran it on Codechef IDE.

Near the run button, you’ll see a box called Custom Input. Click on it, and in the space that appears, paste the sample test case. Now hit Run. It will no longer give you the error.

Feel free to ask if anything is unclear. Hope this was helpful :slight_smile: