a.cpp (496B)
1 #include <iostream> 2 #include <vector> 3 #include <unordered_set> 4 #include <unordered_map> 5 #include <algorithm> 6 #include <queue> 7 8 #define ll long long 9 10 using namespace std; 11 12 int main() { 13 int testCases, n; 14 cin >> testCases; 15 16 // a = n - b 17 // n = a - b 18 // how many (a,b) 19 // b = n-a 20 21 // 2 22 // ans 1 23 24 // 4 25 // ans 3 26 27 // 6 28 // ans 5 29 30 // is this just n - 1? 31 32 for(int z = 0; z < testCases; ++z) { 33 cin >> n; 34 cout << n - 1 << endl; 35 } 36 }