WA in Smart Phone

Can someone help me figure out the problem in my code?

Here is the question link

integer overflow here arr[i]*(n-i)