Help me in solving TRISQ problem

My issue

can somebody explain this

My code

for i in range(int(input())):
    b = int(input())
    n = (b // 2) - 1
    ans = ((n) * (n+1) )//2
    print(ans)

Problem Link: TRISQ Problem - CodeChef

set ans to zero if the value of n=b//2 is less than or equal to 2