Why i m getting wrong ans in 3 tcs?

Why i m getting wrong ans in 3 tcs?

In tc4 and tc5 i m getting wrong ans. Why ?

@namandubey20 hey naman share your code here using coding blocks ide

@namandubey20 hey naman you have used wrong formula for finding the triplet

Can someone reply ??

@namandubey20 yeah we are here just use @ with the name of ta tell me what do you want
?

What is the right formula ??

@namandubey20 hey naman visit this discuss
refer this

This is also showing wrong ans in 2 testcases. Infact this code is same as mine !

@namandubey20 hey naman I have suggested the last one which I have suggested.