Problem E. Passenger Paradox

Xem dạng PDF

Gửi bài giải

Điểm: 1,00
Giới hạn thời gian: 1.0s
Giới hạn bộ nhớ: 256M
Input:stdin
Output:stdout

Authors:
Dạng bài

Trong trường hợp đề bài hiển thị không chính xác, bạn có thể tải đề bài tại đây: Đề bài

On an experimental at UMT University, a smart bus system was designed to manage boarding and disembarking in an unusual way. At each stop, exactly half of the passengers on the bus - plus half a passenger (somehow) - get off.

This process continues identically for k consecutive stops. Remarkably, the bus is completely empty after the last stop, and no passenger was partially harmed or cut - the system somehow ensures integer behavior all along.

Given the number of stops k, can you determine the initial number of passengers n required such that the bus ends up empty under this strange pattern?


Input

The first line contains an integer ~T~ - the number of test cases.

Each of the following T lines contains a single integer ~k~ ~(1 ≤ k ≤ 30)~, the number of stops.


Output

For each test case, print the initial number of passengers n such that the bus becomes empty after exactly k stops.


Sample Input 1

2
1
3

Sample Ouput 1

1
7

Bình luận

Hãy đọc nội quy trước khi bình luận.


Không có bình luận tại thời điểm này.