1
2
3
4
5
6
|
class Solution:
def runningSum(self, nums: List[int]) -> List[int]:
tmp=[]
for i in range(len(nums)):
tmp.append(sum(nums[:i+1]))
return tmp
|
cs |
반응형
'python-algorithm' 카테고리의 다른 글
Leetcode 1672. Richest Customer Wealth (0) | 2021.07.12 |
---|---|
Leetcode 1108. Defanging an IP Address (0) | 2021.07.12 |
Leetcode 1920 (0) | 2021.07.12 |
Leetcode 1929 (0) | 2021.07.12 |
백준 21300 (0) | 2021.05.03 |
댓글