CF1608A.Find Array

普及/提高-

通过率:0%

AC君温馨提醒

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

题目描述

Given nn , find any array a1,a2,,ana_1, a_2, \ldots, a_n of integers such that all of the following conditions hold:

  • 1ai1091 \le a_i \le 10^9 for every ii from 11 to nn .
  • a1<a2<<ana_1 < a_2 < \ldots <a_n
  • For every ii from 22 to nn , aia_i isn't divisible by ai1a_{i-1}

It can be shown that such an array always exists under the constraints of the problem.

输入格式

The first line contains the number of test cases tt ( 1t1001 \le t \le 100 ). Description of the test cases follows.

The only line of each test case contains a single integer nn ( 1n10001 \le n \le 1000 ).

It is guaranteed that the sum of nn over all test cases does not exceed 10410^4 .

输出格式

For each test case print nn integers a1,a2,,ana_1, a_2, \ldots, a_n — the array you found. If there are multiple arrays satisfying all the conditions, print any of them.

输入输出样例

  • 输入#1

    3
    1
    2
    7

    输出#1

    1
    2 3
    111 1111 11111 111111 1111111 11111111 111111111

说明/提示

In the first test case, array [1][1] satisfies all the conditions.

In the second test case, array [2,3][2, 3] satisfies all the conditions, as 2<32<3 and 33 is not divisible by 22 .

In the third test case, array [111,1111,11111,111111,1111111,11111111,111111111][111, 1111, 11111, 111111, 1111111, 11111111, 111111111] satisfies all the conditions, as it's increasing and aia_i isn't divisible by ai1a_{i-1} for any ii from 22 to 77 .

首页