Advertisement
makispaiktis

Exetastiki2020 - Dice Throw

Jul 13th, 2020 (edited)
280
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.31 KB | None | 0 0
  1. 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]
  2. gain = 0
  3. for i in range(0, len(A)):
  4.     if gain == 1:
  5.         gain -= 40
  6.     elif gain == 20:
  7.         gain += 40
  8.     else:
  9.         gain += A[i]
  10.  
  11. print(gain)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement