Why I am getting runtime error even though I solved the sum in same way as explained in tutorial

Please tell me the cause of error and also send the reference solution if possible

@gvspraveen113 you are taking incorrect array size! see that N=10^5!!
also take type as long long as sum may overflow!!

1 Like

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.