Initial solutions for day 5

This commit is contained in:
Lynn Ochs 2020-12-05 08:51:46 +01:00
parent 1c8057dfde
commit 10ac058799
2 changed files with 2 additions and 0 deletions

1
05-1-1.py Normal file
View File

@ -0,0 +1 @@
print(sorted(map(lambda x:int(''.join(map(lambda y:'01'[int(y in'BR')],x)),2),open(0)))//2)

1
05-2-1.py Normal file
View File

@ -0,0 +1 @@
print(set(s:=sorted(map(lambda x:int(''.join(map(lambda y:'01'[int(y in'BR')],x)),2)//2, open(0))))^set(range(s[0],s[-1]+1)))