I am getting run error in this problem. How can I resolve it?

hello @somesh.ps
the issue is with the size of the array.
check maximum value that n can take and declare ur array size bigger than that.

thanks, it works now!