Maximum
You are given
The first line of input is an integer
In the example, you are given
6 inputs 1, 0, 3, 2, 9, 8.
1 is maximum in the input 1.
1 is maximum in the input 1, 0.
3 is maximum in the input 1, 0, 3.
3 is maximum in the input 1, 0, 3, 2.
9 is maximum in the input 1, 0, 3, 2, 9.
9 is maximum in the input 1, 0, 3, 2, 9, 8.
So, the output should be
1
3
3
9
9
n = int(input())
line = []
for i in range(0, n):
line.append(input())
print(max(line))
# print(f'{max(line)} is maximum in the input {", ".join(line)}')
Comments
Leave a comment