Files
aoc/06/f.py
2022-12-06 12:46:42 +02:00

18 lines
355 B
Python

import os
input = open(os.path.dirname(__file__) +
"/input.txt", "r").read()
def findUniq(length):
ind = 0
for x in input:
ind += 1
if len(set(input[ind:ind+length])) == length:
return ind+length
return False
print("First answer: " + str(findUniq(4)))
print("Second answer: " + str(findUniq(14)))