Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Incorrecto
|
0.01 s | 3 KBi |
#2 |
Incorrecto
|
0.01 s | 3 KBi |
#3 |
Incorrecto
|
0.01 s | 3 KBi |
#4 |
Incorrecto
|
0.01 s | 3 KBi |
#5 |
Correcto
|
0.01 s | 3 KBi |
#6 |
Correcto
|
0.022 s | 3 KBi |
#7 |
Incorrecto
|
0.095 s | 4 KBi |
#8 |
Incorrecto
|
0.204 s | 3 KBi |
#9 |
Incorrecto
|
0.151 s | 3 KBi |
#10 |
Incorrecto
|
0.229 s | 4 KBi |
#11 |
Incorrecto
|
0.186 s | 4 KBi |
#12 |
Incorrecto
|
0.044 s | 3 KBi |
#13 |
Tiempo límite excedido
|
1.561 s | 4 KBi |
#14 |
Tiempo límite excedido
|
1.562 s | 3 KBi |
#15 |
Tiempo límite excedido
|
1.573 s | 3 KBi |
#16 |
Tiempo límite excedido
|
1.547 s | 3 KBi |
#17 |
Incorrecto
|
0.036 s | 3 KBi |
#18 |
Incorrecto
|
0.025 s | 3 KBi |
#19 |
Incorrecto
|
0.068 s | 3 KBi |
#20 |
Incorrecto
|
0.023 s | 3 KBi |
#21 |
Incorrecto
|
0.058 s | 3 KBi |
#22 |
Incorrecto
|
0.02 s | 3 KBi |
my_str = '' try: my_str = input() except EOFError: print(0) exit() 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 print(j, last_border_index) 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)