Question #228701

Largest Number in the List

You are given space-separated integers as input. Write a program to print the maximum number among the given numbers.

Input

The first line of input contains space-separated integers.

Explanation

In the example, the integers given are 

1, 0, 3, 2, 9, 8. The maximum number present among them is 9. So, the output should be 9.

Sample Input 1
1 0 3 2 9 8
Sample Output 1
9
Sample Input 2
-1 -3 -4 0
Sample Output 2
0

Expert's answer

numbers = [int(i) for i in input().split()]
max = numbers[0]
for i in numbers[1:]:
    if max < i:
        max = i
print(max)
LATEST TUTORIALS
APPROVED BY CLIENTS