can some one help me this is my solution for problem code TWONUMBERS why i am getting WA
#include<bits/stdc++.h>
#define nline "\n"
#define ll long long
#define pb push_back
#define umap unordered_map
#define mod 1000000007
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int t;cin>>t;
while(t--){
ll n;cin>>n;
ll ans = n-2;
if(n>6){
if(n%2){
ans = (n/2)*((n/2)+1) - 1;
}else{
if((n/2)%2){
ans = ((n/2)-2)*((n/2)+2) - 1;
}else{
ans = ((n/2)-1)*((n/2)+1) - 1;
}
}
}
cout<<ans<<nline;
}
return 0;
}