DeukausGames

Par ou impar OBI

Aug 23rd, 2018
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.33 KB | None | 0 0
  1. # jogo de par ou impar
  2. # obi 2016
  3. # nivel junior f1
  4. # https://olimpiada.ic.unicamp.br/pratique/pj/2016/f1/jogo/
  5.  
  6. p = int(input())
  7. a = int(input())
  8. b = int(input())
  9.  
  10. if p == 0:
  11.     if (a + b) % 2 == 0:
  12.         print(0)
  13.     else:
  14.         print(1)
  15. else:
  16.     if (a + b) % 2 == 0:
  17.         print(1)
  18.     else:
  19.         print(0)
Advertisement
Add Comment
Please, Sign In to add comment