Advertisement
PedroPauloFO

Depois do 13 nada

Jun 4th, 2014
262
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.39 KB | None | 0 0
  1. # Programacao 1, 2014.1 Pedro Paulo
  2. # Depois do 13 nada
  3.  
  4. num1 = int(raw_input())
  5. num2 = int(raw_input())
  6. num3 = int(raw_input())
  7.  
  8. soma = (num1 + num2 + num3)
  9. dupla = num1 + num2
  10.  
  11. if num1 == 13:
  12.     print 0
  13.  
  14. elif soma ==13:
  15.     print 0
  16.    
  17. elif num2 == 13:
  18.     print num1
  19.    
  20. elif dupla != 13 and num3 == 13:
  21.     print dupla
  22.  
  23. elif num3 == 13:
  24.     print 0
  25.    
  26. else:
  27.     print soma
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement