diff --git a/06/f.py b/06/f.py new file mode 100644 index 0000000..23f190f --- /dev/null +++ b/06/f.py @@ -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) == 4: + if len(set(buf)) == 4: + break + else: + buf.pop(0) + +print(index)