MCPcopy Create free account
hub / github.com/AxlLind/AdventOfCode / part1

Function part1

2018/src/02.py:5–9  ·  view source on GitHub ↗
(ids: list[str])

Source from the content-addressed store, hash-verified

3from itertools import combinations
4
5def part1(ids: list[str]) -> int:
6 c = Counter[int]()
7 for l in ids:
8 c.update(set(Counter(l).values()))
9 return c[2]*c[3]
10
11def part2(ids: list[str]) -> str:
12 for a,b in combinations(ids,r=2):

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected