mirror of
https://github.com/danbulant/adventOfCode
synced 2026-05-19 20:28:33 +00:00
8 lines
No EOL
296 B
Python
8 lines
No EOL
296 B
Python
|
|
print(sum([2**(number-1) for number in [
|
|
len(([
|
|
number for number in
|
|
(set(x.strip() for x in (line.split("|")[0].split(":")[1].split(" ")))) & set(x.strip() for x in (line.split("|")[1].split(" "))) if number != ""
|
|
]))
|
|
for line in open("./input2")
|
|
] if number != 0])) |