Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Correcto
|
0.01 s | 3 KBi |
#2 |
Correcto
|
0.022 s | 3 KBi |
#3 |
Correcto
|
0.01 s | 3 KBi |
#4 |
Correcto
|
0.016 s | 3 KBi |
#5 |
Correcto
|
0.01 s | 3 KBi |
#6 |
Correcto
|
0.015 s | 3 KBi |
#7 |
Correcto
|
0.074 s | 3 KBi |
#8 |
Correcto
|
0.059 s | 3 KBi |
#9 |
Correcto
|
0.055 s | 3 KBi |
#10 |
Correcto
|
0.075 s | 3 KBi |
#11 |
Correcto
|
0.062 s | 3 KBi |
#12 |
Correcto
|
0.092 s | 3 KBi |
#13 |
Tiempo límite excedido
|
1.589 s | 3 KBi |
#14 |
Tiempo límite excedido
|
1.528 s | 6 KBi |
#15 |
Tiempo límite excedido
|
1.589 s | 3 KBi |
#16 |
Tiempo límite excedido
|
1.568 s | 3 KBi |
#17 |
Correcto
|
0.031 s | 3 KBi |
#18 |
Correcto
|
0.026 s | 3 KBi |
#19 |
Correcto
|
0.048 s | 3 KBi |
#20 |
Correcto
|
0.025 s | 3 KBi |
#21 |
Correcto
|
0.023 s | 3 KBi |
#22 |
Correcto
|
0.022 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: if my_str[j] == my_str[k]: if j >= last_border_index: counter += length - last_border_index break 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)