#d11203. 序列中位数
序列中位数
Median of the Coprime Sequence
Problem Description
Given a positive integer , consider the sequence formed by all integers in that are coprime to . Find the median of this sequence.
We define the median of a sequence of length to be the element at position (1-indexed) when the sequence is sorted in ascending order. Two positive integers and are coprime if and only if .
Input Format
The first line contains a positive integer , the number of test cases.
For each test case, the input contains one positive integer .
For all test cases, , .
Output Format
For each test case, output one line containing a single positive integer: the answer.
Sample Input
3
6
10
19
Sample Output
1
3
9