Showmik is very popular nowadays. Junior coders always seek help from him. He also wants them to improve their skills. So for them he has given a problem which is not too easy and again not too hard. He is generating a tree which has the following properties:
He will give a random number . They have to find the level number and mark number of the node being created at -th second.
First line of input contains a single number (). test cases follows. Each case has a single number () which indicates the -th second.
For each test case, print answer as the format “Case x: y z” without quotation. Here, indicates the case number and , indicate the desired results.
Input | Output |
---|---|
4 5 21 63 1326509874132650 | Case 1: 3 2 Case 2: 4 12 Case 3: 5 30 Case 4: 18 948498053512337 |
Tree is basically a graph which is connected and there is no cycle. There is only one root node and each node may have zero or more child nodes.