Solve problem "The maximum of the sequence" online - Learn Python 3 - Snakify

The maximum of the sequence


Statement

A sequence consists of integer numbers and ends with the number 0. Determine the largest element of the sequence.

In all the problems input the data using input() and print the result using print().

# Read an integer:
# a = int(input())
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Input:
1
7
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Output:
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Saved solutions

Tests

InputCorrect answer
1
7
9
0
9
1
2
3
2
1
0
3
1
2
3
0
3
1
3
2
0
3
2
1
3
0
3
2
3
1
0
3
3
2
1
0
3
3
1
2
0
3
1
2
3
4
5
0
5
5
4
3
2
1
0
5
80
94
78
67
24
4
22
73
26
38
7
90
37
56
95
37
96
77
51
43
25
91
71
89
99
95
29
87
64
10
0
99