String comparison, ho

This commit is contained in:
Lynn Ochs 2020-12-04 16:52:30 +01:00
parent a290f1f068
commit 9b5ba37333

View File

@ -1 +1 @@
print(sum(map(lambda x:(lambda x:6<sum(map(lambda y:6<len(y)and{'by':lambda x:int(x)<2003,'iy':lambda x:2009<int(x)<2021,'ey':lambda x:2019<int(x)<2031,'hg':lambda x:(99<int(x[:-2])and'm'in x)or(77>int(x[:-2])and'n'in x),'hc':lambda x:7==len(x)and'#'in x and int(x[1:],16)>0,'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"))))
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:(4<len(x)and'm'in x)or(77>int(x[:-2])and'n'in x),'hc':lambda x:7==len(x)and'#'in x and int(x[1:],16)>0,'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"))))