# Write a function solve that returns the running sum of a list.
# The running sum is the sum of all elements up to each index.
def solve(nums):
result = [nums[0]]
for i in range(1, len(nums)):
result.append(result[i - 1] + nums[i])
return result