5 条题解

  • -2
    @ 2024-12-4 11:51:27
    a=list(map(int,input().split()))
    n=len(a)
    b=[]
    bottom=n-1
    for i in range(1,n):
        for j in range(bottom,i-1,-1):
            if a[j]<a[j-1]:
                a[j],a[j-1]=a[j-1],a[j]
            elif a[j]==a[j-1]:
                a[j]=a[bottom]
                bottom-=1
    for i in range(bottom+1):
        print(a[i],end=" ") 
    

    信息

    ID
    806
    时间
    1000ms
    内存
    256MiB
    难度
    5
    标签
    递交数
    736
    已通过
    281
    上传者