1
2
3
4
5
6
7
8
9
|
class Solution:
def smallerNumbersThanCurrent(self, nums: List[int]) -> List[int]:
ans=[]
for i in range(len(nums)):
tmp=0
for j in range(len(nums)):
if nums[i]>nums[j] :tmp+=1
ans.append(tmp)
return ans
|
cs |
반응형
'python-algorithm' 카테고리의 다른 글
Leetcode 1281. Subtract the Product and Sum of Digits of an Integer (0) | 2021.07.15 |
---|---|
Leetcode 1528. Shuffle String (0) | 2021.07.15 |
Leetcode 88. Merge Sorted Array (0) | 2021.07.15 |
Leetcode 771. Jewels and Stones (0) | 2021.07.15 |
Leetcode 171. Excel Sheet Column Number (0) | 2021.07.15 |
댓글