QOJ.ac

QOJ

حد الوقت: 1 s حد الذاكرة: 1024 MB مجموع النقاط: 100

#2509. 右耦合数

الإحصائيات

如果一个整数 $x$ 满足存在两个整数 $a$ 和 $b$,使得 $0 < a \le b \le x$ 且 $a \times b = x$ 以及 $a/b \ge 0.5$,则称该整数为“右耦合数”。在本题中,你的任务是判断给定的整数是否为右耦合数。

输入的第一行包含一个整数 $N$,表示测试用例的数量。每个测试用例占一行,包含一个整数 $0 < x < 2^{15}$。

如果给定的整数 $x$ 是右耦合数,输出 1;否则,输出 0。每个结果占一行。

技术规范

  • $1 \le N \le 1000$
  • $0 < x < 2^{15}$

样例

输入格式 1

4
66
55
105
150

输出格式 1

1
0
0
1

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.