Given a number n. Print the minimum positive integer by which it should be divided so that the result is an odd number.
Input:
First line of the input will contain the number of test cases.
Each test case will contain a single integer n
Output:
Print the required output.
Constraints:
1 <= T <= 100
1 <= N <= 100000
Example:
Input:
3
36
5
8
Output:
4
1
8
Explanation:
In the first case, 36 must be divided by 4 or 12 to make it odd.
We take minimum of 4 and 12 i.e. 4
In the second case, 5 is already odd.
In the third case, 8 must be divided by 8 to make it an odd number.
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.
codersanjeev | 66 |
snow_den_ | 60 |
BoggavarapuRamSaranSaiSrinivasGupta | 60 |
rajupraaa1234 | 53 |
SUZAKU | 49 |
mr_kksparrow | 433 |
manvirag982 | 258 |
snow_den_ | 232 |
arpit_anshuman | 228 |
SoumyaKaushik | 205 |
blackshadows | 5331 |
Ibrahim Nash | 5219 |
akhayrutdinov | 5111 |
mb1973 | 4929 |
Quandray | 4567 |