news 2026/11/4 13:05:54

A. Perfect Root

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
A. Perfect Root

time limit per test

1 second

memory limit per test

256 megabytes

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.

Input

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.

Output

For each test case, output n distinct perfect roots. Each perfect root x must be in the range 1≤x≤109.

Example

Input

Copy

3 1 2 5

Output

Copy

1 2 4 2 102 43 1 21

Note

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-n即可。每个数肯定都符合条件。

#include<stdio.h> int main() { int t; scanf("%d", &t); while (t--) { int n; scanf("%d", &n); for (int i = 1; i <= n; i++) { printf("%d ", i); } printf("\n"); } return 0; }
版权声明: 本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
网站建设 2026/11/3 13:27:21

Week 34: 量子深度学习入门:从 Neural ODE 到哈密顿量子演化

文章目录 Week 34: 量子深度学习入门&#xff1a;从 Neural ODE 到哈密顿量子演化摘要Abstract1. ResNet的连续极限1.1 从离散层到连续流1.2 伴随敏感度法 2. 非均匀时序建模2.1 场景2.2 ODE-RNN 3. 跨越边界&#xff1a;哈密顿量与量子可能性3.1 物理守恒与哈密顿网络 (HNN)3.…

作者头像 李华
网站建设 2026/11/3 10:49:49

Java中strip与trim()的区别

TOC Java中strip与trim()的区别 jdk11及以上版本&#xff0c;java的String支持strip()方法&#xff0c;那么原来的删除空白trim()与strip()的区别时什么&#xff1f; 区别 trim()&#xff1a;仅处理字符串首尾的ASCII空白字符串&#xff08;小于等于\u0020字符&#xff0c;…

作者头像 李华
网站建设 2026/11/1 22:38:38

软件测试—即时通讯测试方法

一、即时通讯实现方式 1.短轮询&#xff08;Short Polling&#xff09; 短轮询是一种客户端定期向服务器发送HTTP请求以检查是否有新数据的简单技术。无论服务器是否有新数据&#xff0c;客户端都会在固定的时间间隔后再次请求。 实现机制 客户端向服务器发送HTTP请求&#xff…

作者头像 李华
网站建设 2026/11/2 1:28:04

免费在线制作家庭小户型平面图的详细教程和设计模板大全

良功绘图网站 (https://www.lghuitu.com ) 一、引言&#xff1a;小户型平面图设计的核心价值与工具选择逻辑 在房价高企的当下&#xff0c;小户型住宅成为众多家庭的首选。如何在有限的空间内实现功能与美观的平衡&#xff0c;平面图设计是关键第一步。一份精准的小户型平面图…

作者头像 李华