Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Correcto
|
0.033 s | 3 KBi |
#2 |
Correcto
|
0.033 s | 3 KBi |
#3 |
Correcto
|
0.038 s | 6 KBi |
#4 |
Correcto
|
0.033 s | 3 KBi |
#5 |
Correcto
|
0.032 s | 6 KBi |
#6 |
Correcto
|
0.026 s | 3 KBi |
#7 |
Correcto
|
0.026 s | 7 KBi |
#8 |
Correcto
|
0.034 s | 3 KBi |
#9 |
Correcto
|
0.03 s | 3 KBi |
#10 |
Correcto
|
0.027 s | 3 KBi |
#11 |
Correcto
|
0.031 s | 3 KBi |
#12 |
Correcto
|
0.023 s | 3 KBi |
#13 |
Correcto
|
0.029 s | 5 KBi |
#14 |
Correcto
|
0.197 s | 32 KBi |
#15 |
Correcto
|
0.283 s | 12 KBi |
#16 |
Correcto
|
0.272 s | 29 KBi |
#17 |
Correcto
|
0.227 s | 29 KBi |
#18 |
Correcto
|
0.18 s | 29 KBi |
#19 |
Correcto
|
0.203 s | 29 KBi |
#20 |
Correcto
|
0.275 s | 59 KBi |
# 0x25 - Suma de un subarreglo N = int(input()) arreglo = [int(x) for x in input().split()] def partir_arreglo_en_2(arreglo): sum_left = 0 sum_right = sum(arreglo) for i in range(len(arreglo)): # print("iteration: ",i) # print("sum_left", sum_left) # print("sum_right", sum_right) if sum_left>0 and sum_right<0: return i sum_left+=arreglo[i] sum_right-= arreglo[i] # print() return "Impossible" print(partir_arreglo_en_2(arreglo))