summaryrefslogtreecommitdiffstats
path: root/6.py
blob: 5c3a3d0a96dc82e32b40b299e67f4034b4bfdb83 (plain)
1
2
3
4
5
6
7
8
with open('6.in') as f:
    inp = f.read().rstrip()
def solve(inp, n):
    for i in range(n, len(inp)):
        if len(set(inp[i-n:i])) == n:
            return i
print(solve(inp, 4))
print(solve(inp, 14))