407585: GYM102835 A Right-Coupled Numbers
Memory Limit:1024 MB
Time Limit:1 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
A. Right-Coupled Numberstime limit per test1 secondmemory limit per test1024 megabytesinputstandard inputoutputstandard output
An integer $$$x$$$ is said to be a right-coupled number, if you can find two integers, say $$$0 \le a \leq b \leq x$$$ such that $$$a \times b = x$$$ and $$$\frac{a}{b} \geq 0.5$$$. In this problem, your task is to determine whether a given integer is a right-coupled number or not.
InputThe first line of the input is an integer $$$N$$$ denoting the number of test cases ($$$1 \le N \le 1000$$$). Each test case is in one line, which contains a single integer $$$0 < x < 2^{15}$$$.
OutputIf the given integer $$$x$$$ is a right-coupled number, output $$$1$$$; otherwise, output $$$0$$$. Each is in a single line.
ExampleInput4 66 55 105 150Output
1 0 0 1