Advertisement
Guest User

Untitled

a guest
Nov 20th, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.47 KB | None | 0 0
  1. openedFiles = open("INPUT.txt")
  2. openedFile = openedFiles.read()
  3. a = 0
  4. b = 0
  5. c = 0
  6. d = 0
  7.  
  8. g = 0
  9.  
  10. if openedFile.split(" ")[0] == 1:
  11.     a = 2
  12.     print(a)
  13. elif openedFile.split(" ")[1] == 1:
  14.     b = 1
  15.     print(b)
  16. elif openedFile.split(" ")[2] == 1:
  17.     c = 1
  18.     print(c)
  19. elif openedFile.split(" ")[3] == 1:
  20.     d = 1
  21.     print(d)
  22. else:
  23.     a = 0
  24.     b = 0
  25.     c = 0
  26.     d = 0
  27.  
  28. g = a + b + c + d
  29. print(g)
  30.  
  31. if g > 2:
  32.     print('YES')
  33. else:
  34.     print('NO')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement