BETA

Difficulty Level: Basic

Submissions: 2712 Accuracy:

53.1%

Swap two nibbles in a byte
     

Given a byte, swap the two nibbles in it. For example 100 is be represented as 01100100 in a byte (or 8 bits). The two nibbles are (0110) and (0100). If we swap the two nibbles, we get 01000110 which is 70 in decimal.

Input:

The first line contains 'T' denoting the number of testcases. Each testcase contains a single positive integer X.


Output:

In each separate line print the result after swapping the nibbles.


Constraints:

1 ≤ T ≤ 70
1 ≤ X ≤ 255


Example:

Input:

2
100
129

Output:

70
24

** For More Input/Output Examples Use 'Expected Output' option **

Set Default Code

					   
It is recommended to 'Compile & Test' your code before clicking 'Submit'!

Compilation/Execution Result:

Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.