The whitewalkers are here and the Great War is on. Each and every living being is giving their best to save the world from the dead. Arya fighting with full dedication found that whitewalkers need to be killed with a pattern or else they wont die. So that she can fight till the end of the war. She tried to understand the pattern. She kills every 'Xth' whitewalker by stabbing them 'N' times .
Whitewalker approaching order (X) Number of times-stabbing(N)
This is the hint of the pattern that Arya needs to follow. Help Arya!
The first line of the input contains an integer T, denoting the number of test cases. The description of each testcase follows. Each test case contains a single line with one integer 'X' the Xth whitewalker .
For each test case in, a new line print the number of stabs required to kill the 'Xth' whitewalker.
1 <= T <= 200
1 <= X <= 200
Testcase 1: The number of set bits in the given number will be the number of stabs required to kill that whitewalker.
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.