Files
advent-of-code/2022/06/part2
2022-12-06 21:11:48 +00:00

15 lines
261 B
Python
Executable File

#!/usr/bin/env python
from collections import deque
with open('input') as f:
offset = 0
buf = deque([], 14)
while True:
buf.append(f.read(1))
offset += 1
if len(set(buf)) == 14:
print(offset)
break