What is wrong with my solution?

I have doubt in this solution. Please help. Like why my answer is wrong.
Question - Contest Page | CodeChef
My solution - Solution: 67774195 | CodeChef

Your variable introdur may lead to overflow as after adding up the duration of all intros, the total value might exceed the limit of int data type.
Therefore intialize it as,
long int introdur=0;

1 Like

Thanks for the help buddy. Don’t know how I neglected this. I have already made ‘duration’ from int to long but forgot about ‘introdur’ in one of my previous solution - Solution: 67774195 | CodeChef

Now it’s Working fine - Solution: 68053399 | CodeChef