1047: Final Exam Test problem
Memory Limit:128 MB
Time Limit:2.000 S
Judge Style:Text Compare
Creator:
Submit:124
Solved:53
Description
4 digits of binary data can present 16 different states. It is convenient to convert the 16 4-digit-binary representations to hexadecimal characters according to the following tables.
0000 -> 0
0001 -> 1
0010 -> 2
0011 -> 3
0100 -> 4
0101 -> 5
0110 -> 6
0111 -> 7
1000 -> 8
1001 -> 9
1010 -> A
1011 -> B
1100 -> C
1101 -> D
1110 -> E
1111 -> F
Input contains N<100000 lines of 8-digit binary data.
Output are N lines of hexadecimal characters
Sample input:
00010001
11001100
10101010
100111001
Output:
11
CC
AA
99
0000 -> 0
0001 -> 1
0010 -> 2
0011 -> 3
0100 -> 4
0101 -> 5
0110 -> 6
0111 -> 7
1000 -> 8
1001 -> 9
1010 -> A
1011 -> B
1100 -> C
1101 -> D
1110 -> E
1111 -> F
Input contains N<100000 lines of 8-digit binary data.
Output are N lines of hexadecimal characters
Sample input:
00010001
11001100
10101010
100111001
Output:
11
CC
AA
99
Input
00010001
11001100
10101010
100111001
11001100
10101010
100111001
Output
11
CC
AA
99
Sample Input Copy
00010001
11001100
10101010
10011001
Sample Output Copy
11
CC
AA
99