#B4212. Find the Largest Number in a Text
Find the Largest Number in a Text
Find the Largest Number in a Text
During a triangle game, (X) is busy playing while (Y) faces a programming challenge and asks for help. The problem is to find the largest number contained in a single line of text. This line may include integers, real numbers, letters, spaces, and other characters. The text has at most (10000) characters. Each number in the text has a length not exceeding (100) (including the decimal point). All numbers are non-negative and have no sign. In addition, integers (i.e. a continuous sequence of digits with no decimal point) will never have leading zeros (except that a single zero is allowed), and for real numbers (which are a continuous sequence of digits with one decimal point, with at least one digit on each side) the integer part follows that same rule. Note that in a real number such as (0.618), the zero before the decimal point is not considered a leading zero.
inputFormat
A single line of text containing up to (10000) characters. This text may include various characters along with numbers that follow the format described above.
outputFormat
Output the largest number found in the input text. The number should be printed exactly as it appears in the text.
sample
abc 123.45 def 67 89.67
123.45