Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Correcto
|
0.032 s | 6 KBi |
#2 |
Correcto
|
0.01 s | 3 KBi |
#3 |
Correcto
|
0.014 s | 3 KBi |
#4 |
Correcto
|
0.01 s | 3 KBi |
#5 |
Correcto
|
0.024 s | 3 KBi |
#6 |
Correcto
|
0.031 s | 3 KBi |
#7 |
Correcto
|
0.178 s | 3 KBi |
#8 |
Correcto
|
0.145 s | 3 KBi |
#9 |
Correcto
|
0.045 s | 3 KBi |
#10 |
Correcto
|
0.056 s | 3 KBi |
#11 |
Incorrecto
|
0.051 s | 3 KBi |
#12 |
Correcto
|
0.119 s | 3 KBi |
#13 |
Tiempo límite excedido
|
1.598 s | 3 KBi |
#14 |
Tiempo límite excedido
|
1.598 s | 3 KBi |
#15 |
Tiempo límite excedido
|
1.598 s | 3 KBi |
#16 |
Tiempo límite excedido
|
1.598 s | 3 KBi |
#17 |
Correcto
|
0.034 s | 3 KBi |
#18 |
Correcto
|
0.067 s | 3 KBi |
#19 |
Incorrecto
|
0.141 s | 3 KBi |
#20 |
Correcto
|
0.022 s | 3 KBi |
#21 |
Correcto
|
0.022 s | 3 KBi |
#22 |
Correcto
|
0.06 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 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)