AoC2020/old/04-2-1.py

2 lines
349 B
Python
Raw Normal View History

2020-12-04 18:12:30 +00:00
print(sum(map(lambda x:(lambda x:6<sum(map(lambda y:6<len(y)and{'by':lambda x:x<'2003','iy':lambda x:'2009'<x<'2021','ey':lambda x:'2019'<x<'2031','hg':lambda x:114-ord(x[-1])==len(x),'hc':lambda x:6<len(x)and'#'in x,'ec':lambda x:x[2]in'buynlh','pi':lambda x:len(x)==9,'ci':lambda x:0}[y[:2]](y[4:]),x)))(x.split()),open(0).read().split("\n\n"))))