AoC2020/02-2-1.py

5 lines
123 B
Python
Raw Normal View History

2020-12-03 23:48:48 +00:00
def f(d,e,f):
a,b=*map(int,d.split('-'))
return (f[a-1]==e[0])^(f[b-1]==e[0])
2020-12-04 11:37:31 +00:00
print(sum(f(*x.split()) for x in open(0)))