Roderic Day hace 2 años
padre
commit
da42f369b7
Se han modificado 1 ficheros con 6 adiciones y 0 borrados
  1. +6
    -0
      y2022/p06.py

+ 6
- 0
y2022/p06.py Ver fichero

@@ -0,0 +1,6 @@
text = open(0).read()
for N in [4, 14]:
for i in range(len(text)):
if len(set(text[i:i + N])) == N:
break
print(i + N)

Cargando…
Cancelar
Guardar