0
点赞
收藏
分享

微信扫一扫

1.9 编程基础之顺序查找 09 直方图 9分 python

http://noi.openjudge.cn/ch0109/09/

"""

1.9 编程基础之顺序查找 09 直方图 9分
http://noi.openjudge.cn/ch0109/09/

"""
n=int(input())

a=list(map(int,input().split()))

lena=len(a)
#print(lena)

max=0
i=0
while i<lena:
                        
            if a[i]>max:
                        max=a[i]
                                    
            i+=1

#print(max)


ans=[]

k=0
while k<=max:
            count=0
            for num in a:
                        if num==k:
                                    count+=1
            ans.append(count)
                                    
            k+=1

lenx=len(ans)

j=0

while j<lenx-1:
            print(ans[j])
            j+=1
print(ans[j])
举报

相关推荐

0 条评论