AoC2020/04-2-2.py

3 lines
230 B
Python
Raw Normal View History

2020-12-05 08:27:46 +00:00
import re
2020-12-05 08:29:43 +00:00
print(sum(map(lambda x:(lambda x:6<sum(map(lambda x:None!=re.match(r'(by.:(1...|200[0-2])|iyr:20(1.|20)|eyr:20(2.|30)|hgt:...(n|cm)|hc.:#.{6}|ec.:..[buynlh]|pi.:.{9})$',x),x)))(x.split()),open(0).read().split("\n\n"))))