I have a doubt about this question's solution

One of my test case is showing run error…while my program is running forn=1 to n=99 acc. to constraints…pls help me to identify the problem
this is my code

Try to submit with i=1;i<=n;i++ and j=1;j<=i;j++ and in the formula (number*(i-j))/(j)