Move Python solutions

This commit is contained in:
Felix Bargfeldt 2023-10-19 22:06:58 +02:00
parent 6fae773051
commit 2f1872bbd9
Signed by: Defelo
GPG key ID: 2A05272471204DD3
255 changed files with 0 additions and 4323 deletions

20
Python/2022/06.py Normal file
View file

@ -0,0 +1,20 @@
def get_input(puzzle: str) -> str:
return puzzle
def part1(puzzle: str):
for i in range(4, len(puzzle)):
if len(set(puzzle[i - 4 : i])) == 4:
return i
def part2(puzzle: str):
for i in range(14, len(puzzle)):
if len(set(puzzle[i - 14 : i])) == 14:
return i
if __name__ == "__main__":
from aoc import run
run(2022, 6, part1, part2)