1
0
mirror of https://github.com/chylex/Advent-of-Code.git synced 2025-06-02 06:34:05 +02:00
Advent-of-Code/2022/06/main.py
2022-12-26 07:56:55 +01:00

13 lines
304 B
Python

import collections
from utils.input import read_input_lines
input_sequence = read_input_lines()[0]
buffer = collections.deque(maxlen = 4)
for i, c in enumerate(input_sequence):
buffer.append(c)
if len(set(buffer)) == 4:
print(f"Found start-of-packet marker at: {i + 1}")
break