Advertisement
Guest User

Untitled

a guest
Nov 20th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.53 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. else:
  14.     a = 0
  15.  
  16.    
  17. if openedFile.split(" ")[1] == 1:
  18.     b = 1
  19.     print(b)
  20. else:
  21.     b = 0
  22.    
  23.    
  24. if openedFile.split(" ")[2] == 1:
  25.     c = 1
  26.     print(c)
  27. else:
  28.     c = 0
  29.    
  30.    
  31. if openedFile.split(" ")[3] == 1:
  32.     d = 1
  33.     print(d)
  34. else:
  35.     d = 0
  36.  
  37.    
  38. g = a + b + c + d
  39. print(g)
  40.  
  41. if g > 2:
  42.     print('YES')
  43. else:
  44.     print('NO')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement