aoc2022/06/2022-12-06-AB.py
2022-12-06 09:45:12 +01:00

15 lines
323 B
Python

#!/usr/bin/env python3
a=open("06/i").read()
for x in [4,14]:
for i in range(x,len(a)):
test_str = a[i-x:i]
fail = False
for c in test_str:
if test_str.count(c) > 1:
fail = True
if not fail:
print(i)
print(test_str)
break