Move into 2022 folder

This commit is contained in:
Mark Hoekveen
2024-11-11 09:05:01 +01:00
parent 9dd6a4f275
commit e0d955ec6f
28 changed files with 5 additions and 11 deletions
+20
View File
@@ -0,0 +1,20 @@
from collections import deque
LEN = 14
dups = deque(maxlen=LEN)
def hasdups():
for x in dups:
if dups.count(x) > 1:
return True
return False
with open("input.txt", "r") as f:
line = f.readline().strip()
for (index, char) in enumerate(line):
dups.append(char)
print(char)
print(dups)
if len(dups) >= LEN and not hasdups():
print(index+1)
break