news 2026/4/16 15:42:29

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/4/16 12:59:21

五大智能建站工具真实测评:不画饼,真能上线那种

最近在搞一个支付平台的项目&#xff0c;我前端水平一般&#xff0c;实在不想花几周去啃UI框架。干脆试了一圈AI建站工具&#xff0c;结果还真发现了几个能打的——不光能生成页面&#xff0c;连后台逻辑、数据对接都能搞定&#xff0c;几分钟就能搭出能跑起来的应用。 下面这…

作者头像 李华
网站建设 2026/4/11 22:47:56

人群仿真软件:Vadere_(6).Vadere中的障碍物设置

障碍物设置 在人群仿真软件Vadere中&#xff0c;障碍物的设置对于模拟真实环境中的各种情况至关重要。障碍物可以是墙壁、柱子、家具等&#xff0c;这些障碍物会影响行人的行走路径和行为。本节将详细介绍如何在Vadere中设置障碍物&#xff0c;包括障碍物的定义、添加、编辑和…

作者头像 李华
网站建设 2026/4/13 9:21:44

免费工艺流程模板下载_在线编辑建筑/汽车/物流工艺流程图图表

良功绘图网站 (https://www.lghuitu.com ) 在建筑、汽车、物流等行业的日常运营与项目推进中&#xff0c;工艺流程可视化是提升效率、规范管理的核心手段。无论是建筑工程的施工管控、汽车制造的生产线优化&#xff0c;还是物流行业的仓储配送调度&#xff0c;一份清晰、规范的…

作者头像 李华
网站建设 2026/4/16 12:42:24

AI金融风控:智能反欺诈与个性化理财

一、AI金融风控的核心价值与行业背景 随着数字金融的快速迭代&#xff0c;金融欺诈手段呈现智能化、隐蔽化、团伙化趋势&#xff0c;传统风控模式面临严峻挑战。2023年某电商平台披露数据显示&#xff0c;全年因恶意刷单、账号盗刷等造成的损失超2.3亿元&#xff0c;某银行信用…

作者头像 李华
网站建设 2026/4/16 9:15:12

MCP与A2A深度解析:AI系统集成与智能体协作的未来之路

MCP与A2A是AI系统集成的两大关键协议。MCP解决AI安全调用工具与数据的问题&#xff0c;提供资源、工具和提示模板三大能力&#xff1b;A2A则规范智能体间的协作&#xff0c;通过任务、消息和产物等组件实现高效接力。它们共同构成AI系统的分层规范&#xff0c;将开发范式从&quo…

作者头像 李华