Fair and Square
For a given number n, determine whether a square can be constructed using an n number of rectangles, each having a 2:1 aspect ratio.
Note: The rectangles can be of different sizes, but they must hold a 2:1 aspect ratio
Input Format
- The first line contains an integer t - the number of test cases
- The next t lines each contains an integer n denoting the number of rectangles
Output Format
- For each test case, if it is possible to make a square out of the given n rectangles, output TRUE.
- Otherwise ouput FALSE
Constraints
- 1 \(\leq\) t \(\leq\) 100
- 1 \(\leq\) n \(\leq\) 100
Sample Input 0
2
1
2
Sample Output 0
FALSE
TRUE
Open on HackerRank ↗ · Markdown source · Back to the archive