CF2185A.Perfect Root
入门
通过率:0%
时间限制:1.00s
内存限制:256MB
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
A positive integer x is a perfect root if there exists an integer y such that y=x. For example, 5 is a perfect root because 25=5.
For each test case, output n distinct perfect roots. Note that the values only need to be distinct within each test case; you can use the same value in different test cases.
正整数 x 称为完全根,若存在整数 y,使得 y=x。例如,5 是一个完全根,因为 25=5。
对每个测试用例,输出 n 个互不相同的完全根。注意:这些值只需在每个测试用例内部互不相同;不同测试用例之间可以重复使用相同的值。
输入格式
The first line of the input contains a single integer t (1≤t≤20) — the number of test cases.
The only line of each test case contains an integer n (1≤n≤20) — the number of perfect roots to output.
输入的第一行包含一个整数 t(1≤t≤20)——测试用例的数量。
每个测试用例仅有一行,包含一个整数 n(1≤n≤20)——需要输出的完全平方根的数量。
输出格式
For each test case, output n distinct perfect roots. Each perfect root x must be in the range 1≤x≤109.
对于每个测试用例,输出 n 个互不相同的完全幂根。每个完全幂根 x 必须满足范围 1≤x≤109。
输入输出样例
输入#1
3 1 2 5
输出#1
1 2 4 2 102 43 1 21
说明/提示
For the first test case:
- 1 is a perfect root because 1=1.
For the second test case:
- 2 is a perfect root because 4=2.
- 4 is a perfect root because 16=4.
对于第一个测试用例:
- 1 是一个完全根,因为 1=1。
对于第二个测试用例:
- 2 是一个完全根,因为 4=2。
- 4 是一个完全根,因为 16=4。
输入解题思路,AI测评打分。不知道怎么写?