Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # interruptor
- # obi 2016
- # nivel junior f1
- # https://olimpiada.ic.unicamp.br/pratique/pj/2016/f1/lampadas/
- n = int(input())
- c = input().split(" ")
- c1 = list(map(int,c))
- A = c1.count(1)
- A += c1.count(2)
- B = 0
- B += c1.count(2)
- if A % 2 == 0:
- print(0)
- else:
- print(1)
- if B % 2 == 0:
- print(0)
- else:
- print(1)
Advertisement
Add Comment
Please, Sign In to add comment