You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

p06.py 147B

2 years ago
123456
  1. text = open(0).read()
  2. for N in [4, 14]:
  3. for i in range(len(text)):
  4. if len(set(text[i:i + N])) == N:
  5. break
  6. print(i + N)