Compare commits

...

2 Commits

Author SHA1 Message Date
51dd7d367a Day 6 answer 2 2022-12-06 07:24:41 +02:00
6b716bf476 Day 6 answer 1 2022-12-06 07:21:22 +02:00

19
06/f.py Normal file
View File

@@ -0,0 +1,19 @@
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) == 14:
if len(set(buf)) == 14:
break
else:
buf.pop(0)
print(index)