Reduce 4-2-2 a bit
This commit is contained in:
parent
56a890f392
commit
768d536af0
|
@ -1,3 +1,3 @@
|
|||
import re
|
||||
m=lambda x:None!=re.match(r'(by.:(1...|200[0-2])|iyr:20(1.|20)|eyr:20(2.|30)|hgt:..(in|.cm)|hc.:#.{6}|ec.:..[buynlh]|pi.:.{9})$',x)
|
||||
m=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)
|
||||
print(sum(map(lambda x:(lambda x:6<sum(map(m,x)))(x.split()),open(0).read().split("\n\n"))))
|
||||
|
|
Loading…
Reference in New Issue
Block a user