[LeetCode] 1480. Running Sum of 1d Array
Python
class Solution:
def runningSum(self, nums: List[int]) -> List[int]:
answer = []
for i in range(len(nums)):
answer.append(sum(nums[:i + 1]))
return answer
댓글남기기