Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
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
Please
log in
to post a comment.
Breakfast Static Function
Dar
Pairs with given sum
Sort 0's 1's 2's
Hi
Dijkastra
sd
Dar
Vector Example
thread
Please log in to post a comment.