#C3967. Total Coins
Total Coins
Total Coins
You are given a game in which the number of coins collected at each level follows an exponential growth pattern. Specifically, at the i-th level, you collect \(2^i\) coins. Given the number of levels \(L\) completed, your task is to compute the total number of coins collected.
The total number of coins after \(L\) levels can be expressed by the formula:
[ \text{Total Coins} = 2^1 + 2^2 + \cdots + 2^L = 2\times(2^L - 1)]
You need to process multiple test cases.
inputFormat
The input is read from stdin and has the following format:
T L1 L2 ... LT
Where:
- T is the number of test cases.
- Each Li is an integer representing the number of levels completed in the i-th test case.
outputFormat
For each test case, output a single line containing the total number of coins collected. The result for each test case should be output to stdout on a separate line.
## sample3
1
2
3
2
6
14
</p>