AoC2020/02-2-1.py
2020-12-04 20:39:18 +01:00

5 lines
122 B
Python

def f(d,e,f):
a,b=*map(int,d.split('-'))
return (f[a-1]==e[0])^(f[b-1]==e[0])
print(sum(f(*x.split())for x in open(0)))