Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Correcto
|
0.024 s | 3 KBi |
#2 |
Correcto
|
0.026 s | 6 KBi |
#3 |
Correcto
|
0.022 s | 3 KBi |
#4 |
Correcto
|
0.023 s | 3 KBi |
#5 |
Correcto
|
0.022 s | 3 KBi |
#6 |
Correcto
|
0.022 s | 3 KBi |
#7 |
Correcto
|
0.027 s | 3 KBi |
#8 |
Correcto
|
0.023 s | 3 KBi |
#9 |
Correcto
|
0.025 s | 3 KBi |
#10 |
Correcto
|
0.021 s | 3 KBi |
#11 |
Correcto
|
0.024 s | 3 KBi |
#12 |
Correcto
|
0.027 s | 5 KBi |
#13 |
Correcto
|
0.026 s | 3 KBi |
#14 |
Correcto
|
0.181 s | 32 KBi |
#15 |
Correcto
|
0.295 s | 12 KBi |
#16 |
Correcto
|
0.309 s | 29 KBi |
#17 |
Correcto
|
0.291 s | 29 KBi |
#18 |
Correcto
|
0.156 s | 32 KBi |
#19 |
Correcto
|
0.222 s | 29 KBi |
#20 |
Correcto
|
0.304 s | 57 KBi |
nNumbers = int(input()) numbers = list(map(int, input().rsplit(" "))) assert nNumbers == len(numbers), "Different lengths." whole = sum(numbers) left = 0 for i in range(1, nNumbers): left = left + numbers[i - 1] right = whole - left if left > 0 and right < 0: index = i break else: index = "Impossible" print(index)