Files
aoc/06/f.py
2022-12-06 07:21:22 +02:00

20 lines
309 B
Python

import os
input = open(os.path.dirname(__file__) +
"/input.txt", "r").read()
index = 0
index2 = 0
buf = []
for x in input:
index += 1
index2 += 1
buf.append(x)
if len(buf) == 4:
if len(set(buf)) == 4:
break
else:
buf.pop(0)
print(index)