adventofcode2022/day06/sol.py

7 lines
139 B
Python

N = 14
for l in open("input"):
for i in range(0, len(l)):
if len(set(l[i:i+N])) == N:
print(i+N)
break