Code
#include<bits/stdc++.h>
using namespace std;
int main()
{
int t;
cin>>t;
while(t--){
int n;
cin>>n;
if(n%2!=0){
cout<<n/2<<endl;
}
else{
cout<<(n/2)-1<<endl;
}
}
}
Information
- Submit By
- Type
- Pretest
- Problem
- P1073 Pair Sum
- Language
- C++17 (G++ 13.2.0)
- Submit At
- 2024-08-17 14:33:16
- Judged At
- 2024-11-11 03:08:20
- Judged By
- Score
- 10
- Total Time
- 2ms
- Peak Memory
- 540.0 KiB