CBINARYT - Complete Binary Tree
Problem Statement:
MLM business is a very popular Business. In this business there are different levels of every person. A person is demandable when his level is high and then he can earn more money. There will be always two hands (or sites what you say) of each person in each level. After fulfilling the hands or sites of each person, the level will forward to the next level. My friend Sumon is interested about this business but he cannot understand that how many people are there in-between the beginning of the level to the level in which he is now. The levels start from level zero and your task is, how many people are there up-to level N.
Input:
The first line of the input contains an integer T (0<T < 1000) number of test cases. Second line input is N (0 ≤ N ≤ 55) that indicates the level.
Be careful Don’t underestimate the value of 55 because the result is a big number & remember the time limit.
Output:
For each case, print the case number and the total number of peoples. See the sample input/output for exact formatting.
Sample Input/Output:
Sample Input |
Sample Output |
3 1 3 4 |
Case 1: 3 Case 2: 15 Case 3: 31 |
_________________________________________________________________________________________________________________
Problem setter: Shipu Ahamed Dept. of CSE
Bangladesh University of Business and Technology (BUBT)
Added by: | Shipu Ahamed |
Date: | 2013-03-05 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All |
Resource: | My Own |