How is This wrong and This right for This Question .

contraint are N<=10000 and A[i]<=10^9, so max sum should be 10^13, which is well suited in long long int , so its modulo could be taken at the end?

3 Likes

I had a very funny experience at this contest and wasted a lot of time. This is just one of the problems where I was stuck because of very bad formulation of the problem.

Apparently, the question wants to ask which friend has the maximum count after taking modulo. (not the same as maximum count and printing its modulo).

I am not even sure if that’s the intent of the question, because it’s very lame. More likely just careless problem setting.

1 Like

You are right. IT Makes sense now , Thank You

1 Like