Given a number X. The task is to check if X is woodall number or not.
A Woodall Number is of the form:
Wn = n.2n – 1
The first few Woodall numbers are: 1, 7, 23, 63, 159, 383, 895……
The first line of the input contains an integer T denoting number of test cases. Each of the following T lines will contain an integer N.
For each test case, Print 1 if N is a Woodall number else 0 in a new line.
1 <= T <= 104
1 <= N <= 105
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.