Codeforces Round #633 (Div. 2) ------ Filling Diamonds

题目

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.
在这里插入图片描述
You have to answer t independent test cases.

Input
The first line contains a single integer t (1≤t≤104) — the number of test cases.
Each of the next t lines contains a single integer n (1≤n≤109).

Output
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 1018.

样例:

输入:
2
2
1
输出:
2
1

很简单的一道水题,观察之后得有一个竖着放的其他的都是横着的,所以输入n,输出n即可。

AC代码:

#include<iostream>
using namespace std;
int main()
{
	int t; cin >> t;
	while (t--) {
		int n; cin >> n;
		cout << n << endl;
	}
	return 0;
}
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值