Skip to content
Snippets Groups Projects
Commit c0270852 authored by BoB's avatar BoB
Browse files

day7_oneliner

parent 2a2c5d6c
No related branches found
No related tags found
No related merge requests found
%% Cell type:code id: tags:
```
sum(t for t, e in zip(*zip(*[(int(t.strip()), list(map(int, e.strip().split()))) for t, e in (line.split(":") for line in open('input07.txt'))])) if (f := lambda x, s, t: (s == t) if (not x or s > t) else f(x[1:], s + x[0], t) or f(x[1:], s * x[0], t) or f(x[1:], int(str(s) + str(x[0])), t))(e[1:], e[0], t))
```
%% Output
162987117690649
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment