Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- q = [0] * 12
- w = [0] * 12
- e = int(input())
- for r in range(e):
- q[r]=int(input())
- for j in range(5, 2, -1):
- for x in range(e):
- if (q[x] < j) and (q[x + 1]==j) and (w[x + 1]==0):
- q[x] = j
- w[x] = 1
- if (q[x] < j) and (q[x - 1]==j) and (w[x - 1]==0):
- q[x] = j
- w[x] = 1
- for i in range(e):
- print(q[i])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement