Зареждане на задачата…
Running totals help you quickly see how much has accumulated by each step, such as daily sales or expenses. Given a list of numbers nums, return a list of the same length. Each element should be the sum of all numbers from the start of nums through that position.
[1, 2, 3, 4][1, 3, 6, 10][][][5][5]def running_totals(nums: list[int]) -> list[int]:
Влез, за да видиш историята на решенията
ВходВлез, за да използваш ИИ ментора
Вход[1,2,3,4][1,3,6,10][][][5][5][-1,1,-1,1][-1,0,-1,0][10,0,0,5][10,10,10,15][2,2,2][2,4,6]