Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- coding: utf-8 -*-
- while True:
- # Número de vezes jogadas
- # 1 ≤ N ≤ 10000
- n = int(input())
- if n == 0:
- break
- john = mary = 0
- # Lista de resultados
- r = input()
- for i in range(0, n*2, 2):
- if r[i] == '0':
- mary += 1
- else:
- john += 1
- print("Mary won %d times and John won %d times" % (mary, john))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement