CF1339A.Filling Diamonds

入门

通过率:0%

时间限制:1.00s

内存限制:256MB

AC君温馨提醒

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

题目描述

You have integer nn. Calculate how many ways are there to fully cover belt-like area of 4n−24n-2 triangles with diamond shapes.

Diamond shape consists of two triangles. You can move, rotate or flip the shape, but you cannot scale it.

22 coverings are different if some 22 triangles are covered by the same diamond shape in one of them and by different diamond shapes in the other one.

Please look at pictures below for better understanding.

On the left you can see the diamond shape you will use, and on the right you can see the area you want to fill.

These are the figures of the area you want to fill for n=1,2,3,4n = 1, 2, 3, 4.

You have to answer tt independent test cases.

你有一个整数 nn。请计算有多少种方法可以使用菱形图案完全覆盖一个由 4n−24n-2 个三角形构成的带状区域。

每个菱形图案由两个三角形组成。你可以对菱形进行平移、旋转或翻转,但不能缩放。

如果在两种覆盖方案中,存在某两个三角形:在其中一种方案中被同一个菱形覆盖,而在另一种方案中被不同的菱形覆盖,则认为这两种覆盖方案不同。

请参考下方图片以帮助理解。

左侧为你将使用的菱形图案,右侧为待填充的区域。

这些是 n=1,2,3,4n = 1, 2, 3, 4 时待填充区域的示意图。

你需要回答 tt 个相互独立的测试用例。

输入格式

The first line contains a single integer tt (1≤t≤1041 \le t \le 10^{4}) — the number of test cases.

Each of the next tt lines contains a single integer nn (1≤n≤1091 \le n \le 10^{9}).

第一行包含一个整数 tt(1≤t≤1041 \le t \le 10^{4})—— 表示测试用例的数量。

接下来的 tt 行中,每行包含一个整数 nn(1≤n≤1091 \le n \le 10^{9})。

输出格式

For each test case, print the number of ways to fully cover belt-like area of 4n−24n-2 triangles using diamond shape. It can be shown that under given constraints this number of ways doesn't exceed 101810^{18}.

对于每个测试用例,输出使用菱形完全覆盖 4n−24n-2 个三角形组成的带状区域的方法数。在给定约束下可以证明,该方法数不超过 101810^{18}。

输入输出样例

  • 输入#1

    2
    2
    1

    输出#1

    2
    1

说明/提示

In the first test case, there are the following 22 ways to fill the area:

In the second test case, there is a unique way to fill the area:

在第一个测试用例中,填充该区域共有以下 22 种方式:

在第二个测试用例中,填充该区域有唯一一种方式:

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

首页