Balanced sum

Design the function @suma_equilibrada(f)@ that, given a list of integers
f, returns the smallest index i such that the sum of the elements of f
from the first position until the position i is equal to the sum of the
subsequent elements. Note that i has to be a valid position in the list.
If this position does not exist, the function will return -1.

Sample session

Problem information

Author: InfBesos

Generation: 2026-01-25T16:21:09.834Z

© Jutge.org, 2006–2026.
https://jutge.org
