Skip to content

Latest commit

 

History

History
17 lines (9 loc) · 738 Bytes

README.md

File metadata and controls

17 lines (9 loc) · 738 Bytes

Utopian-Tree

Problem Statement

The Utopian Tree goes through 2 cycles of growth every year. The first growth cycle occurs during the spring, when it doubles in height. The second growth cycle occurs during the summer, when its height increases by 1 meter.

Now, a new Utopian Tree sapling is planted at the onset of spring. Its height is 1 meter. Can you find the height of the tree after N growth cycles?

Input Format

The first line contains an integer, T, the number of test cases. T lines follow; each line contains an integer, N, that denotes the number of cycles for that test case.

Output Format

For each test case, print the height of the Utopian Tree after N cycles. Each line thus has to contain a single integer, only.