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?
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.
For each test case, print the height of the Utopian Tree after N cycles. Each line thus has to contain a single integer, only.
static void Main(string args)
int totalCycles = Convert.ToInt32(Console.ReadLine());
for (int i = 0; i < totalCycles; ++i)
currentHight = 1;
int currentCycle = Convert.ToInt32(Console.ReadLine());
for (int j = 1; j <= currentCycle; ++j)
if (j % 2 == 0)
currentHight += 1;
currentHight *= 2;