0
点赞
收藏
分享

微信扫一扫

LeetCode|1365. 有多少小于当前数字的数字(python)

精进的医生 2022-02-25 阅读 72

题目:
在这里插入图片描述
代码:

class Solution:
    def smallerNumbersThanCurrent(self, nums: List[int]) -> List[int]:
        arr=[]
        for i in nums:
            count=0
            for j in nums:
                if(i>j):
                    count+=1
            arr.append(count)
        return arr
举报

相关推荐

0 条评论