BETA

Difficulty Level: Easy

Submissions: 230 Accuracy:

25.22%

BBT counter
       

Given a height h, count and return the maximum number of balanced binary trees possible with height h. A balanced binary tree is one in which for every node, the difference between heights of left and right subtree is not more than 1.

Input:
The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. Each test case contains an integer height h.

Output:
Count the maximum number of balanced binary trees possible with height h.

Constraints:
1<=T<=100
1<=h<=1000

Example:
Input:

2
3
70

Output:
40
327960719

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Ayush Govil

Set Default Code

					   
It is recommended to 'Compile & Test' your code before clicking 'Submit'!

Compilation/Execution Result:

Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.