QOJ.ac

QOJ

実行時間制限: 1 s メモリ制限: 1024 MB 満点: 100

#3696. 简单数学

統計

给定 $n$ 个整数 $a_1, a_2, \dots, a_n$,请判断它们的平方根之和 $\sqrt{a_1} + \sqrt{a_2} + \dots + \sqrt{a_n}$ 是否为一个整数。

输入包含多组测试数据。对于每组测试数据:

第一行包含一个整数 $n$ ($1 \leq n \leq 10^5$)。

第二行包含 $n$ 个整数 $a_1, a_2, \dots, a_n$ ($0 \leq a_i \leq 10^9$)。

对于每组测试数据,如果和为整数,则输出 "Yes",否则输出 "No"。

样例

输入格式 1

2
1 4
2
2 3

输出格式 1

Yes
No

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.