CF2185A.Perfect Root

入门

通过率:0%

时间限制:1.00s

内存限制:256MB

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

A positive integer xx is a perfect root if there exists an integer yy such that y=x\sqrt{y} = x. For example, 55 is a perfect root because 25=5\sqrt{25} = 5.

For each test case, output nn 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.

正整数 xx 称为完全根,若存在整数 yy,使得 y=x\sqrt{y} = x。例如,55 是一个完全根,因为 25=5\sqrt{25} = 5。

对每个测试用例,输出 nn 个互不相同的完全根。注意:这些值只需在每个测试用例内部互不相同;不同测试用例之间可以重复使用相同的值。

输入格式

The first line of the input contains a single integer tt (1≤t≤201 \leq t \leq 20) — the number of test cases.

The only line of each test case contains an integer nn (1≤n≤201 \leq n \leq 20) — the number of perfect roots to output.

输入的第一行包含一个整数 tt(1≤t≤201 \leq t \leq 20)——测试用例的数量。

每个测试用例仅有一行,包含一个整数 nn(1≤n≤201 \leq n \leq 20)——需要输出的完全平方根的数量。

输出格式

For each test case, output nn distinct perfect roots. Each perfect root xx must be in the range 1≤x≤1091 \leq x \leq 10^9.

对于每个测试用例,输出 nn 个互不相同的完全幂根。每个完全幂根 xx 必须满足范围 1≤x≤1091 \leq x \leq 10^9。

输入输出样例

  • 输入#1

    3
    1
    2
    5

    输出#1

    1
    2 4
    2 102 43 1 21

说明/提示

For the first test case:

  • 11 is a perfect root because 1=1\sqrt{1} = 1.

For the second test case:

  • 22 is a perfect root because 4=2\sqrt{4} = 2.
  • 44 is a perfect root because 16=4\sqrt{16} = 4.

对于第一个测试用例:

  • 11 是一个完全根,因为 1=1\sqrt{1} = 1。

对于第二个测试用例:

  • 22 是一个完全根,因为 4=2\sqrt{4} = 2。
  • 44 是一个完全根,因为 16=4\sqrt{16} = 4。

输入解题思路,AI测评打分。不知道怎么写?

首页