#P7018. [CERC2013] Bus

[CERC2013] Bus

题目描述

A bus with nn passengers opens its door at the bus stop. Exactly half of its passengers and an additional half of a passenger get out. On the next stop, again, half of the passengers plus half of a passenger leave the bus. This goes on for kk stops in total. Knowing that the bus leaves the last stop empty, and that no one was hurt during the trip, determine the initial number nn of people in the bus.

输入格式

The first line of input contains the number of test cases TT. The descriptions of the test cases follow:

The only line of each test case contains the number of stops kk, 1k301 \leq k \leq 30.

输出格式

For each test case, output a single line containing a single integer—the initial number of bus passengers.

题目大意

[CERC2013] Bus

题面翻译

有一个数 nn ,定义一次操作为使 nn12n\rightarrow \frac{n-1}{2} 。已知经过了 kk 次操作后 nn 恰好为 00,求 nn

多测,有 TT 组数据,TT 在输入数据开头给出。

保证 1k301\leqslant k\leqslant 30

题目描述

A bus with nn passengers opens its door at the bus stop. Exactly half of its passengers and an additional half of a passenger get out. On the next stop, again, half of the passengers plus half of a passenger leave the bus. This goes on for kk stops in total. Knowing that the bus leaves the last stop empty, and that no one was hurt during the trip, determine the initial number nn of people in the bus.

输入格式

The first line of input contains the number of test cases TT. The descriptions of the test cases follow:

The only line of each test case contains the number of stops kk, 1k301 \leq k \leq 30.

输出格式

For each test case, output a single line containing a single integer—the initial number of bus passengers.

样例 #1

样例输入 #1

2
1
3

样例输出 #1

1
7

提示

Time limit: 1000 ms, Memory limit: 1048576 kB.

Central Europe Regional Contest (CERC) 2013

2
1
3

1
7

提示

Time limit: 1000 ms, Memory limit: 1048576 kB.

Central Europe Regional Contest (CERC) 2013