题解 | 左侧严格小于计数

左侧严格小于计数

https://www.nowcoder.com/practice/c5922c6cdd1445749bd42f586c422435

n=int(input())
ls=[]
d=list(map(int,input().split()))

for b in range(n):
    count = 0
    for c in range(b):
        if d[b]>d[c]:
            count+=1
    ls.append(count)
print(str(ls)[1:-1:].replace(',',''))
'''
# 使用*解包和sep参数来格式化输出
print(*b)
'''

全部评论

相关推荐

不知道怎么取名字_:看来现在卷的,这种单位都开始提高要求了
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务