Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n = int(input())
- max1 = 1
- max2 = 1
- max3 = 1
- flag = False
- for i in range(n):
- x = int(input())
- if x > max3 and x % 5 == 0:
- max3 = x
- flag = True
- if (x > max1):
- max1 = max2
- max2 = x
- else:
- if x > max2:
- max2 = x
- if flag != True:
- print("NO")
- else:
- print(max1,max2, max3)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement