Бурдюгова Мария, 321 SecondMax 1091
Абдул Гани Надим, 634 SecondMax 1492
n1max_num = float('-inf')n1max1 = float('-inf')
2second_max = float('-inf')2max2 = float('-inf')
3while True:3while True:
4    num = int(input())4    num = int(input())
5    if num == 0:5    if num == 0:
6        break6        break
t7    if num > max_num:t7    if num > max1:
8        second_max = max_num8        max2 = max1
9        max_num = num
10    elif num > second_max and num != max_num:
11        second_max = num9        max1 = num
10    elif num > max2 and num < max1:
11        max2 = num
12if second_max != float('-inf'):12if max2 != float('-inf'):
13    print(second_max)13    print(max2)
14else:14else:
15    print('NO')15    print('NO')
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op