Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Correcto
|
0.032 s | 3 KBi |
#2 |
Correcto
|
0.024 s | 3 KBi |
#3 |
Correcto
|
0.022 s | 3 KBi |
#4 |
Correcto
|
0.059 s | 7 KBi |
#5 |
Correcto
|
0.021 s | 3 KBi |
#6 |
Correcto
|
0.018 s | 3 KBi |
#7 |
Correcto
|
0.019 s | 3 KBi |
#8 |
Incorrecto
|
0.024 s | 3 KBi |
#9 |
Error interno
No such file or directory @ rb_sysopen - /box/script.py |
||
#10 |
Correcto
|
0.021 s | 3 KBi |
#11 |
Correcto
|
0.035 s | 3 KBi |
#12 |
Correcto
|
0.037 s | 3 KBi |
#13 |
Correcto
|
0.036 s | 3 KBi |
#14 |
Correcto
|
0.311 s | 32 KBi |
#15 |
Correcto
|
0.388 s | 12 KBi |
#16 |
Correcto
|
0.512 s | 29 KBi |
#17 |
Correcto
|
0.513 s | 29 KBi |
#18 |
Error interno
No such file or directory @ rb_sysopen - /box/script.py |
||
#19 |
Correcto
|
0.437 s | 29 KBi |
#20 |
Error interno
No such file or directory @ rb_sysopen - /box/script.py |
a = [] N = 0 sum_total = 0 partial_sum = 0 N = int(input()) for num in input().split(' '): x = int(num) sum_total += x a.append(x) for member in range(N): partial_sum += a[member] if partial_sum > 0: if sum_total - partial_sum < 0: print (member+1) break else: continue elif ((member == N-1) and (partial_sum == sum_total)): print('Impossible') else: continue