307322: CF1339A. Filling Diamonds

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

Filling Diamonds

题意翻译

### 题目描述: 给定一个数字 $n$ ,要求你用 $n$ 个菱形去填满 $4n-2$ 个正三角形。求有多少种不同的填法。 其中,这一个菱形由两个正三角形组成,它可以被平移或是旋转,但是不可以被缩放。 上图是 $n \ = 1,2,3,4$ 时的需要填充的三角形。 ### 输入格式: **本题有多组数据!** 第一行,一个整数 $T$ ,表示测试数据的组数 接下来的 $T$ 行中,每行只有一个整数 $n$ 。 ### 输出格式: 总共有 $T$ 行 ,每一行都输出一个整数,代表填充对应的 $4n - 2$ 个三角形的不同方式的种数。 ### 说明/提示: ------------ #### 数据范围: $1 \le T \le 10^{4}$。 $1 \le n \le 10^{9}$。 对于每一个测试数据,保证填充方法的种数 $\le 10^{18}$ ------------ #### 提示: 如下图,当 $n \ = 2 $ 时,有不同的两种填充方法。 ------------ · Translated by black_trees

题目描述

You have integer $ n $ . Calculate how many ways are there to fully cover belt-like area of $ 4n-2 $ triangles with diamond shapes. Diamond shape consists of two triangles. You can move, rotate or flip the shape, but you cannot scale it. $ 2 $ coverings are different if some $ 2 $ 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. ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF1339A/13939933dc7d3e630430763f7020234fec4c2bc3.png) 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.![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF1339A/7fff5be8f830afa5425faaf9881be90640b6bdaf.png) These are the figures of the area you want to fill for $ n = 1, 2, 3, 4 $ . You have to answer $ t $ independent test cases.

输入输出格式

输入格式


The first line contains a single integer $ t $ ( $ 1 \le t \le 10^{4} $ ) — the number of test cases. Each of the next $ t $ lines contains a single integer $ n $ ( $ 1 \le n \le 10^{9} $ ).

输出格式


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

输入输出样例

输入样例 #1

2
2
1

输出样例 #1

2
1

说明

In the first test case, there are the following $ 2 $ ways to fill the area: ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF1339A/3befdc7d6a53f6884556b0c58193496c00f0d12c.png)In the second test case, there is a unique way to fill the area: ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF1339A/7bf21a272dc1c4065587bc035a90f874e457a80a.png)

Input

题意翻译

### 题目描述: 给定一个数字 $n$ ,要求你用 $n$ 个菱形去填满 $4n-2$ 个正三角形。求有多少种不同的填法。 其中,这一个菱形由两个正三角形组成,它可以被平移或是旋转,但是不可以被缩放。 上图是 $n \ = 1,2,3,4$ 时的需要填充的三角形。 ### 输入格式: **本题有多组数据!** 第一行,一个整数 $T$ ,表示测试数据的组数 接下来的 $T$ 行中,每行只有一个整数 $n$ 。 ### 输出格式: 总共有 $T$ 行 ,每一行都输出一个整数,代表填充对应的 $4n - 2$ 个三角形的不同方式的种数。 ### 说明/提示: ------------ #### 数据范围: $1 \le T \le 10^{4}$。 $1 \le n \le 10^{9}$。 对于每一个测试数据,保证填充方法的种数 $\le 10^{18}$ ------------ #### 提示: 如下图,当 $n \ = 2 $ 时,有不同的两种填充方法。 ------------ · Translated by black_trees

加入题单

上一题 下一题 算法标签: