The Utopian tree goes through 2 cycles of growth every year. The first growth cycle occurs during the monsoon, 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 the monsoon. 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.
Constraints
1
Original: https://www.cnblogs.com/springfor/p/4005774.html
Author: 爱做饭的小莹子
Title: Utopian Tree in Java
原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/539047/
转载文章受原作者版权保护。转载请注明原作者出处!