DeukausGames

Clube dos cinco OBI

Aug 22nd, 2018
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.46 KB | None | 0 0
  1. # clube dos cincos
  2. # obi 2016 nivel 1 f1
  3. # by : Deukaus / Matheus Santos
  4. # https://olimpiada.ic.unicamp.br/pratique/p1/2016/f1/clube/
  5. alunos = int(input())
  6. l = input().split(" ")
  7. esportes = list(map(int, l))
  8. a,b,c,d,e,f,g = esportes[0], esportes[1], esportes[2], esportes[3], esportes[4], esportes[5], esportes[6]
  9. alunos -= d+e+f+g
  10. a -= d+e
  11. b -= d+f
  12. c -= e+f
  13. if alunos < 0 or a < 0 or b < 0 or c < 0 or alunos != a+b+c:
  14.     print("S")
  15. else:
  16.     print("N")
Advertisement
Add Comment
Please, Sign In to add comment