This commit is contained in:
2022-12-06 12:50:24 +02:00
parent b53e041014
commit 120a015fbf

10
06/f.py
View File

@@ -5,12 +5,10 @@ input = open(os.path.dirname(__file__) +
def findUniq(length):
ind = 0
for x in input:
ind += 1
if len(set(input[ind:ind+length])) == length:
return ind+length
return False
for i in range(len(input)):
if len(set(input[i:i+length])) == length:
return i+length
return -1
print("First answer: " + str(findUniq(4)))