Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Correcto
|
0.021 s | 3 KBi |
#2 |
Correcto
|
0.011 s | 3 KBi |
#3 |
Correcto
|
0.011 s | 3 KBi |
#4 |
Correcto
|
0.011 s | 3 KBi |
#5 |
Correcto
|
0.026 s | 3 KBi |
#6 |
Correcto
|
0.011 s | 3 KBi |
#7 |
Correcto
|
0.053 s | 3 KBi |
#8 |
Correcto
|
0.134 s | 6 KBi |
#9 |
Correcto
|
0.046 s | 3 KBi |
#10 |
Correcto
|
0.07 s | 3 KBi |
#11 |
Incorrecto
|
0.053 s | 3 KBi |
#12 |
Correcto
|
0.1 s | 3 KBi |
#13 |
Tiempo límite excedido
|
1.591 s | 3 KBi |
#14 |
Tiempo límite excedido
|
1.591 s | 3 KBi |
#15 |
Tiempo límite excedido
|
1.591 s | 3 KBi |
#16 |
Tiempo límite excedido
|
1.591 s | 3 KBi |
#17 |
Correcto
|
0.034 s | 3 KBi |
#18 |
Correcto
|
0.061 s | 3 KBi |
#19 |
Incorrecto
|
0.127 s | 3 KBi |
#20 |
Correcto
|
0.022 s | 3 KBi |
#21 |
Correcto
|
0.043 s | 3 KBi |
#22 |
Correcto
|
0.022 s | 3 KBi |
my_str = input() length = len(my_str) border_length = 0 last_border_index = length counter = 0 i = length - 1 while i > 0: if my_str[i] == my_str[0]: j = i k = 0 while j < length and j < last_border_index: if my_str[j] == my_str[k]: counter += 1 else: counter = 0 break j += 1 k += 1 if counter: border_length += counter last_border_index = i counter = 0 i -= 1 print(border_length)