https://www.codechef.com/viewsolution/28055543 explain the line sum=sum+(n-(2i-1))(arr[n-i]);
See the Editorial here or my solution here.
i cant see the solution can you tell how did they open the summation formula for solution access has been denied
See here.