Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Correcto
|
0.021 s | 3 KBi |
#2 |
Incorrecto
|
0.021 s | 3 KBi |
#3 |
Incorrecto
|
0.023 s | 3 KBi |
#4 |
Incorrecto
|
0.023 s | 3 KBi |
#5 |
Correcto
|
0.023 s | 3 KBi |
#6 |
Incorrecto
|
0.022 s | 3 KBi |
#7 |
Incorrecto
|
0.023 s | 3 KBi |
#8 |
Incorrecto
|
0.022 s | 3 KBi |
#9 |
Incorrecto
|
0.024 s | 3 KBi |
#10 |
Incorrecto
|
0.021 s | 3 KBi |
#11 |
Incorrecto
|
0.022 s | 3 KBi |
#12 |
Correcto
|
0.022 s | 3 KBi |
#13 |
Incorrecto
|
0.024 s | 3 KBi |
#14 |
Incorrecto
|
0.323 s | 33 KBi |
#15 |
Incorrecto
|
0.456 s | 13 KBi |
#16 |
Tiempo límite excedido
|
0.453 s | 29 KBi |
#17 |
Incorrecto
|
0.487 s | 29 KBi |
#18 |
Correcto
|
0.277 s | 29 KBi |
#19 |
Incorrecto
|
0.372 s | 29 KBi |
#20 |
Tiempo límite excedido
|
0.454 s | 60 KBi |
n = input() size =int(n) i=0 sum_total=0 array = size*[0] root = 0 array_totals_slice =[0,0] number =input() args =number.split() flag ='Impossible' for i in range(0,size): array[i] = int(args[i]) sum_total= sum_total + array[i] i=0 array_totals_slice[0] = array[0] array_totals_slice[1] = sum_total - array[0] if array_totals_slice[0] > 0 and array_totals_slice[1] < 0: root = 1 flag = int(i+1) i=0 if root==0: print(array_totals_slice) for i in range (1,(size)): array_totals_slice[0] = array_totals_slice[0] + array[i] array_totals_slice[1] = array_totals_slice[1] - array[i] if array_totals_slice[0] > 0 and array_totals_slice[1] < 0: flag = int(i+1) break print(flag)