Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Correcto
|
0.025 s | 3 KBi |
#2 |
Correcto
|
0.029 s | 3 KBi |
#3 |
Correcto
|
0.026 s | 3 KBi |
#4 |
Correcto
|
0.03 s | 3 KBi |
#5 |
Correcto
|
0.021 s | 3 KBi |
#6 |
Correcto
|
0.032 s | 3 KBi |
#7 |
Correcto
|
0.138 s | 7 KBi |
#8 |
Correcto
|
0.148 s | 7 KBi |
#9 |
Correcto
|
0.103 s | 7 KBi |
#10 |
Correcto
|
0.147 s | 7 KBi |
#11 |
Correcto
|
0.171 s | 7 KBi |
#12 |
Correcto
|
0.127 s | 7 KBi |
#13 |
Correcto
|
0.238 s | 7 KBi |
#14 |
Correcto
|
0.156 s | 7 KBi |
#15 |
Correcto
|
0.242 s | 7 KBi |
#16 |
Correcto
|
0.214 s | 7 KBi |
#17 |
Correcto
|
0.113 s | 5 KBi |
#18 |
Correcto
|
0.113 s | 4 KBi |
#19 |
Correcto
|
0.199 s | 4 KBi |
#20 |
Correcto
|
0.086 s | 4 KBi |
#21 |
Correcto
|
0.106 s | 4 KBi |
#22 |
Correcto
|
0.147 s | 4 KBi |
s = input() table = [0] * len(s) i = 0 j = i + 1 while i < len(s) and j < len(s): if s[i] != s[j]: if i != 0: i = table[i-1] continue table[j] = 0 j += 1 else: table[j] = i + 1 i += 1 j += 1 print(table[len(s)-1])