Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- s = 6
- N = int(input())
- result = 1000*1000
- a = [1000]*s
- n = int(input())
- if n % 2 != 0:
- a[0] = n
- for i in range(1, s):
- n = int(input())
- if n % 2 != 0:
- a[i] = min(n, a[i-1])
- for i in range(s, N):
- n = int(input())
- if n % 2 != 0:
- result = min(n*a[i % s], result)
- a[i % s] = min(a[(i-1) % s], n)
- if result % 2 != 0:
- print(result)
- else:
- print(-1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement