-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path2044_Easy_Problem.cpp
More file actions
47 lines (41 loc) · 1.01 KB
/
Copy path2044_Easy_Problem.cpp
File metadata and controls
47 lines (41 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/* A. Easy Problem
time limit per test 1 second
memory limit per test 256 megabytes
Cube is given an integer n. She wants to know how many ordered pairs of positive integers (a,b) there are such that a=n−b.
Since Cube is not very good at math, please help her!
Input
The first line contains an integer t (1≤t≤99) — the number of test cases.
The only line of each test case contains an integer n (2≤n≤100).
Output
For each test case, output the number of ordered pairs (a,b) on a new line.
Example
Input:
3
2
4
6
Output:
1
3
5
Note
In the first test case, the only ordered pair that works is (a,b)=(1,1).
In the second test case, the three ordered pairs of (a,b) that work are (3,1),(2,2),(1,3).
*/
#include<bits/stdc++.h>
using namespace std;
int t,n,i,j;
void solve(){
int k;
cin>>n;
cout<<n-1<<endl;
}
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
cin>>t;
while(t--)
{
solve();
}
}