Let’s define an easy sequence . Where:
Here is a positive integer. The first few elements of the sequence are 1, 2, 4, 5, 10, 17, 22, 26, 52, 101.
Now given a value of , can you compute ?
The first line of the input is a positive integer (), the number of test cases. Then lines follow.
In each line there will be a value of (). It is guaranteed that for every in the input, there exists a valid .
For each case print a line in format where is the test case number and is the corresponding value for the given in the input.
Input | Output |
---|---|
10 1 2 4 5 10 17 22 26 52 101 | Case 1: 1 Case 2: 2 Case 3: 3 Case 4: 4 Case 5: 5 Case 6: 6 Case 7: 7 Case 8: 8 Case 9: 9 Case 10: 10 |