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

Function main

2018/src/12.py:28–32  ·  view source on GitHub ↗
(indata: str)

Source from the content-addressed store, hash-verified

26
27@aoc.main('12')
28def main(indata: str) -> tuple[int,int]:
29 state, rest = indata.split('\n\n')
30 pots = {i for i,c in enumerate(state.split(": ")[-1]) if c == '#'}
31 transitions = {s[:5] for s in rest.split('\n') if s[-1] == '#'}
32 return part1(transitions, pots), part2(transitions, pots)
33
34if __name__ == "__main__":
35 main()

Callers 1

12.pyFile · 0.70

Calls 2

part1Function · 0.70
part2Function · 0.70

Tested by

no test coverage detected