A. Maximum GCD
Problem
Let’s consider all integers in the range from 1 1 1 to n n n (inclusive).
Among all pairs of distinct integers in this range, find the maximum possible greatest common divisor of integers in pair. Formally, find the maximum value of g c d ( a , b ) \mathrm{gcd}(a, b) gcd(a,b), where KaTeX parse error: Expected 'EOF', got '&' at position 10: 1 \leq a &̲lt; b \leq n.
The greatest common divisor, g c d ( a , b ) \mathrm{gcd}(a, b) gcd(a,b), of two positive integers a a a and b b b is the biggest integer that is a divisor of both a a a and b b b.
Input
The first line contains a single integer t t t ( 1 ≤ t ≤ 100 1 \leq t \leq 100 1≤t≤100) — the number of test cases. The description of the test cases follows.
The only line of each test case contains a single integer n n n ( 2 ≤ n ≤ 1 0 6 2 \leq n \leq 10^6 2≤n≤106).
Output
For each test case, output the maximum value of g c d ( a , b ) \mathrm{gcd}(a, b) gcd(a,b) among all KaTeX parse error: Expected 'EOF', got '&' at position 10: 1 \leq a &̲lt; b \leq n.
Example
Input
2
3
5
Output
1
2
Note
In the first test case, g c d ( 1 , 2 ) = g c d ( 2 , 3 ) = g c d ( 1 , 3 ) = 1 \mathrm{gcd}(1, 2) = \mathrm{gcd}(2, 3) = \mathrm{gcd}(1, 3) = 1 gcd(1,2)=gcd(2,3)=gcd(1,3)=1.
In the second test case, 2 2 2 is the maximum possible value, corresponding to g c d ( 2 , 4 ) \mathrm{gcd}(2, 4) gcd(2,4).
Code
// #include <iostream>
// #include <algorithm>
// #include <cstring>
// #include <stack>//栈
// #include <deque>//堆/优先队列
// #include <queue>//队列
// #include <map>//映射
// #include <unordered_map>//哈希表
// #include <vector>//容器,存数组的数,表数组的长度
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
void solve()
{
ll n;
cin>>n;
cout<<n/2<<endl;
}
int main()
{
ll t;
cin>>t;
while(t--) solve();
return 0;
}