Problem Statement
Given a non-negative integer , calculate the result of rotating to the left by one bit. Assume fits in 8 bits.
Input Specification
The first line of the input gives the number of test cases, , test cases follow. Each test case consists of a line. The line contain a non-negative integer .
Limits
Memory limits: 32MB.
Time limits: 1 second.
Test Set 1
Sample Case.
Test Set 2
Test Set 3
Test Set 4
Output Specification
For each test case, output one line containing Case #x: y
, where is the case number(starting from 1) and is the result of rotating to the left by one bit.
Sample Input
3
12
130
255
Sample Output
Case #1: 24
Case #2: 5
Case #3: 255
Explaination
In Sample Case #1, the binary representation of 12
is 0b1100
and binary representation of 24
is 0b11000
.
In Sample Case #2, the binary representation of 130
is 0b10000010
and binary representation of 5
is 0b101
.
In Sample Case #3, the binary representation of 255
is 0b11111111
.
Hint
bitwise and/or operator
,shift oprator
,bin
Comments
:)