Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- N = int(input())
- a = [int(input()) for i in range(7)]
- m = 1001
- minpr = 1000001
- R = minpr
- for i in range(7,N):
- x = int(input())
- b = a[i % 7]
- if b < m and b % 2 == 0:
- m = b
- if m * x < minpr and (m * x) % 2 == 0:
- minpr = m * x
- a[i % 7] = x
- if minpr != R:
- print(minpr)
- else:
- print(-1)
Advertisement
Add Comment
Please, Sign In to add comment