Skip to content

Instantly share code, notes, and snippets.

@gt50
Created August 2, 2017 21:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gt50/86a4c45299e6c5c34ba477fbdfc751c8 to your computer and use it in GitHub Desktop.
Save gt50/86a4c45299e6c5c34ba477fbdfc751c8 to your computer and use it in GitHub Desktop.
#!/bin/python3
import sys
from functools import reduce
def solve(a0, a1, a2, b0, b1, b2):
# Complete this function
a = [a0, a1, a2]
b = [b0, b1, b2]
alice = sum([1 if i-j > 0 else 0 for i,j in zip(a,b)])
bob = sum([1 if i-j > 0 else 0 for i,j in zip(b,a)])
return alice, bob
a0, a1, a2 = input().strip().split(' ')
a0, a1, a2 = [int(a0), int(a1), int(a2)]
b0, b1, b2 = input().strip().split(' ')
b0, b1, b2 = [int(b0), int(b1), int(b2)]
result = solve(a0, a1, a2, b0, b1, b2)
print (" ".join(map(str, result)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment