Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Correcto
|
0.021 s | 3 KBi |
#2 |
Correcto
|
0.026 s | 3 KBi |
#3 |
Correcto
|
0.025 s | 3 KBi |
#4 |
Correcto
|
0.025 s | 3 KBi |
#5 |
Correcto
|
0.022 s | 3 KBi |
#6 |
Correcto
|
0.027 s | 3 KBi |
#7 |
Correcto
|
0.064 s | 3 KBi |
#8 |
Correcto
|
0.072 s | 3 KBi |
#9 |
Correcto
|
0.092 s | 3 KBi |
#10 |
Correcto
|
0.08 s | 3 KBi |
#11 |
Correcto
|
0.062 s | 3 KBi |
#12 |
Correcto
|
0.046 s | 3 KBi |
#13 |
Incorrecto
|
0.061 s | 3 KBi |
#14 |
Correcto
|
0.083 s | 3 KBi |
#15 |
Correcto
|
0.094 s | 3 KBi |
#16 |
Correcto
|
0.068 s | 3 KBi |
#17 |
Correcto
|
0.047 s | 3 KBi |
#18 |
Correcto
|
0.027 s | 3 KBi |
#19 |
Correcto
|
0.059 s | 3 KBi |
#20 |
Correcto
|
0.027 s | 3 KBi |
#21 |
Correcto
|
0.049 s | 7 KBi |
#22 |
Correcto
|
0.021 s | 3 KBi |
def string_edge(s): next_index = 1 size = 1 while True: current_index = 0 next_index = s.find(s[0], next_index) if next_index == -1: return 0 while True: current_index += 1 next_index += 1 if next_index == len(s): return size if s[current_index] == s[next_index]: size += 1 else: size = 1 break s = input() print(string_edge(s))