#include<bits/stdc++.h>
#define ll long long
using namespace std;
/*
题意:A和B两人分n个糖,每人最少一个,且A分得的数量要大于B,只要分奇偶情况输出就行
*/
int main()
{
ll t,n;
cin>>t;
for(int i=0;i<t;i++)
{
cin>>n;
if(n%2==0)
{
cout<<n/2-1<<endl;
}
else{
cout<<n/2<<endl;
}
}
}
5.23 VJ E - Candies and Two Sisters
原文:https://www.cnblogs.com/SyrupWRLD999/p/12941940.html