Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- A = [14, 20, 15, 11, 5, 7, 18, 7, 11, 9, 18, 6, 16, 2, 6, 1, 11, 19, 11, 6, 7, 10, 18, 13, 9, 10, 1, 14, 9, 15, 17, 12, 1, 2, 12, 14, 9, 13, 1, 6]
- gain = 0
- for i in range(0, len(A)):
- if gain == 1:
- gain -= 40
- elif gain == 20:
- gain += 40
- else:
- gain += A[i]
- print(gain)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement