AWESOMECHILDHOOD - Awesome Childhood

Childhood is the best time of anyone. We all time miss those awesome moments. Do you remember the winter morning of school day? I can remember! My mom woke me to go to school but I acted like "I don't hear anything!"

Can you remember the feelings when your mom is beating your siblings and you are the next!!! Ahh... those days!!!

Let’s play a childhood game. You must be feel nostalgic.

Think of a number (N) in your head. Borrow that number from your friend. Add them and you have now 2N. I give you 10236 (let G). Add G with 2N. Then equally divide the whole number [(2N+G)/2]. One part keep on your mind and another part through away. Now it’s time to back the borrowed part to your loving friend [{(2N+G)/2}-N]. Finally you have 5118!

Think what a genius I am! I know the remaining number! Can you do so?

Input

First of all input an integer T (0 < T < 10000). T denotes the number of test cases to follow. For each case you’ll given an integer G (1 < G <= 2^32). Where G is multiple of 2.

Output

For each test case print one line of the form “Case T: R”. Where T is the case number and R is the result according to above description. See sample I/O for more clear.

Example

Input:
2
10236
172

Output:
Case 1: 5118
Case 2: 86

Added by:Hasan Abdullah
Date:2017-02-16
Time limit:0.5s-1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All
Resource:https://algo.codemarshal.org/contests/new-year-2017/problems/A

hide comments
2023-08-15 01:32:15
cute beginning of task's text :3
2017-09-04 15:46:34
I used unsigned long long int but still it's showing WA
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.