Please explain me given test cases output

How it is 49?. I think it should be 19.

@sauravgupta2800 taking 2nd point(8) and last point(7) 7x7=49

Please review my code.

@sauravgupta2800 for sample input your code is giving 19 ans is 49 as told

Itis working fine, Thanks.