Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
series kv type 1
#include<iostream> #include<iomanip> using namespace std; int main() { int t; cin>>t; int a,b; while(t--) { int n; cin>>n; if(n%2==0) { a=(n/2)-1; cout<<a; } else { b=n-1; cout<<b; } if(t>0) { cout<<endl; } } }
run
|
edit
|
history
|
help
0
1
Ultimate gauss
CS 201
pangram
Age
Test 9(2021)
basic TREAP
K edit distance
LRU - template
ADAKOHL - hpclearn