Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n = int(input())
- a = [0] * n
- for i in range(n):
- a[i] = int(input())
- Max = a[0]
- P = -1
- for i in range(8, n):
- if a[i - 8] > Max:
- Max = a[i - 8]
- if Max * a[i] > P:
- P = Max * a[i]
- print(P)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement