Answer coming wrong

Answer of testcase 1 and testcase 3 are coming wrong . please help.

use long looking at the constraints. this ll pass all the test cases