Shorten 4-1

This commit is contained in:
Lynn Ochs 2020-12-04 17:28:58 +01:00
parent 4fa675f155
commit 4eb36eacd0

View File

@ -1 +1 @@
print(sum(map(lambda x:7==len(set(['byr','iyr','eyr','hgt','hcl','ecl','pid'])&set(map(lambda y:y[:3],x.replace('\n',' ').split(' ')))),open(0).read().split("\n\n"))))
print(sum(map(lambda x:6<len(''.join(sorted(map(lambda y:y[:2].replace('ci','')[:1],x.split())))),open(0).read().split('\n'*2))))