daily pastebin goal
13%
SHARE
TWEET

1661-comercio em georgia.py

a guest Mar 21st, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     def intList(array):
  2.     for index, element in enumerate(array):
  3.         array[index] = int(element)
  4.     return array
  5.  
  6.  
  7. n = quantidadeDePessoas = int(input())
  8. a = vinhosPorPessoa = intList(input().split())
  9. trabalho = 0
  10. for index in range(len(vinhosPorPessoa[:-1])):
  11.     atualPessoa = vinhosPorPessoa[index]
  12.     trabalho += abs(atualPessoa)
  13.     vinhosPorPessoa[index+1] += atualPessoa
  14.     vinhosPorPessoa[index] = 0
  15. print(trabalho)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top