How should I do this? I don't have any ideas. Please answer

CSDN Q & A 2021-11-25 15:04:19

Title Description
Give several decimal numbers 、 Octal number 、 Hexadecimal number , Please output the largest number , And keep its base in the input

When more than one number is the largest , Please output the earliest of these numbers in the input

Input :
There are four lines of input

The first line contains three decimal integers separated by spaces x,y,z(1<=x,y,z<=100) They represent decimal numbers 、 Octal number 、 Number of hexadecimal numbers

The second line x A decimal number separated by spaces

The third line y An octal number separated by spaces

In the fourth row z A hexadecimal number separated by spaces , The letters are lowercase English letters

For all given integers a,0<=a<=10^8

Output :
Output an integer representing the maximum value , Keep the decimal value of this number at the time of input

When more than one number is the largest , Output the first of these numbers in the input

The sample input
2 1 1
123 456
24
34f
Sample output
34f




Refer to the answer 1:

Convert to decimal for size comparison , Go to my blog to find binary conversion .




Refer to the answer 2:
Please bring the original link to reprint ,thank
Similar articles

2021-11-25