Advertisement
Avdluna

13

Nov 22nd, 2016
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.30 KB | None | 0 0
  1. # coding: utf-8
  2. # 13 melhor time
  3. # Amanda Luna / UFCG
  4.  
  5. lista = []
  6.  
  7. for i in range(3) :
  8.     numero = int(raw_input())
  9.     lista.append(numero)
  10.  
  11.  
  12. pos = lista.index(13)
  13.  
  14. for i in range(pos,len(lista)) :
  15.     lista.remove(lista[i])
  16.  
  17.  
  18. soma = sum(lista)
  19.  
  20. if soma == 13 :
  21.     print "0"
  22.  
  23. else :
  24.     print soma
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement