Problem:


ヒストグラム

テンアイスクリームという名前のアイスクリーム屋さんがあります。このお店では常に 10 種類のアイスクリームが店頭に並ぶようにしています。お店の店長は商品開発の参考にするために、アイスクリームの売れ具合を表すグラフを毎日作成しています。

 そんな店長のために、あなたは各アイスクリームの販売数をグラフで表示するプログラムを作成することになりました。

 一日に販売されるアイスクリームの総数と売れたアイスクリームの番号を入力とし、アイスクリームの種類ごとに販売した数だけ * (半角アスタリスク) を出力するプログラムを作成してください。ただし、アイスクリームの種類を 0 から 9 までの整数で表わします。また、販売個数がゼロのアイスクリームは、- (半角ハイフン) をひとつ出力します。

Input

複数のデータセットの並びが入力として与えられます。入力の終わりはゼロひとつの行で示されます。
各データセットは以下の形式で与えられます。

n
c1
c2
:
cn

1 行目に一日に販売されるアイスクリームの総数 n (1 ≤ n ≤ 10000) が与えられます。続く n 行に第 i のアイスクリームの種類 ci (0 ≤ ci≤ 9) が与えられます。

データセットの数は 20 を超えません。

Output

入力データセットごとに、各アイスクリームの種類の番号順に販売数を出力します。

Sample Input

15
2
6
7
0
1
9
8
7
3
8
9
4
8
2
2
3
9
1
5
0

Output for the Sample Input

*
*
***
*
*
-
*
**
***
**
-
*
-
-
-
*
-
-
-
*



Sample input:
15
2
6
7
0
1
9
8
7
3
8
9
4
8
2
2
3
9
1
5
0


Sample output:
*
*
***
*
*
-
*
**
***
**
-
*
-
-
-
*
-
-
-
*

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3

while True:
    n = int(input())
    data = [0] * 10
    if n == 0:
        break

    for _ in range(n):
        in_data = int(input())
        data[in_data - 1] += 1

    for d in data:
        for _ in range(d):
            print("*", end="")

        if d == 0:
            print("-")
        else:
            print(end="\n")

Submission status: Wrong Answer

Solution code:
while True:
    n = int(input())
    if n == 0:
        break
        
    d = {k: 0 for k in range(n)}
    for _ in range(n):
        x = int(input())
        d[x] += 1

    for k in range(n):
        print("*"*d[k] + "-"*(d[k]==0))

Submission status: Wrong Answer

Solution code:

if __name__ == '__main__':

    while True:


        n = int(raw_input())
        if n == 0:
            break

        data = [0 for a in range(n)]
    #    print data

        for m in range(n):
            inp = int(raw_input())

            data[inp-1] += 1
    #        print data

        for m in range(n):

            if data[m] == 0:
                print '-'

            else:
                for c in range(data[m]):
                    print '*',

                print

Submission status: Wrong Answer

Solution code:
if __name__ == '__main__':

    while True:

        n = int(raw_input())
        if n == 0:
            break

        data = [0 for a in range(10)]
        print data

        for m in range(n):
            inp = int(raw_input())

            data[inp] += 1
            print data

        for m in range(10):

            if data[m] == 0:
                print '-'

            else:
                for c in range(data[m]):
                    print '*',

                print

Submission status: Wrong Answer

Solution code:
n = int(raw_input())
data = [0] * 10

for a in range(n):
    t = int(raw_input())
    data[t] += 1
    
for a in range(10):
    if data[a] == 0:
        print '-'
    else:
        for t in range(data[a]):
            print '*',
        print

Submission status: Wrong Answer

Solution code:
while(True):
    n = int(raw_input())
    if n == 0:
        break
    data = [0] * 10

    for a in range(n):
       t = int(raw_input())
       data[t] += 1
    
    for a in range(10):
        
        if data[a] == 0:
            print '-'
        else:
            for t in range(data[a]):
                print '*',
            if a != 9:
                print

Submission status: Accepted

Solution code:
while(True):
    n = int(input())
    if not n: break
    a = [0]*10
    for _ in range(n):
        a[int(input())] += 1
    for b in a:
        print("*"*b if b else "-")

Submission status: Accepted

Solution code:
while True:
  n=int(input())
  x=[0 for i in range(10)]
  if n==0:
    break
  for i in range(n):
    a=int(input())
    if a==0:
      x[0]+=1
    elif a==1:
      x[1]+=1
    elif a==2:
      x[2]+=1
    elif a==3:
      x[3]+=1
    elif a==4:
      x[4]+=1
    elif a==5:
      x[5]+=1 
    elif a==6:
      x[6]+=1
    elif a==7:
      x[7]+=1
    elif a==8:
      x[8]+=1
    else:
      x[9]+=1
  for i in range(10):
    if x[i]==0:
      print('{}'.format('-')) 
    else:
      print('{}'.format(x[i]*'*'))

Submission status: Accepted

Solution code:
from collections import Counter
while True:
    cnt = Counter()
    n = int(input())
    if n == 0: break
    for i in range(n):
        cnt[int(input())] +=1

    for i in range(10):
        print('*'*cnt[i] if cnt[i] else '-')

Submission status: Accepted

Solution code:
import sys
f = sys.stdin

from collections import Counter

while True:
    n = int(f.readline())
    if n == 0:
        break
    counter = Counter(int(f.readline()) for _ in range(n))
    for i in range(10):
        print('*' * counter[i] if 0 < counter[i] else '-')

Submission status: Accepted

Solution code:
while True:
    n = int(raw_input())
    if n == 0: break
    res = ['' for i in range(10)]
    for i in range(n):
        res[input()] += '*'
    for ans in res:
        if ans == '':
            print '-'
        else:
            print ans

Submission status: Accepted

Solution code:
while 1:
    n=int(input())
    if n==0: break
    a=[0]*10
    while n:
        n-=1
        a[int(input())]+=1
    for i in range (10):
        for j in range(a[i]):
            
            print('*',end="")
        if a[i]==0:
            print('-',end="")
        print()

Submission status: Accepted

Solution code:
while True:
    n= int(input())
    if n== 0: break
    c= [int(input()) for _ in range(n)]
    for i in range(10):
        cc= c.count(i)
        print('-' if cc== 0 else cc*"*")

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

while True:
    n = int(input())
    data = [0] * 10
    if n == 0:
        break

    for _ in range(n):
        in_data = int(input())
        data[in_data] += 1

    for d in data:
        for _ in range(d):
            print("*", end="")

        if d == 0:
            print("-")
        else:
            print(end="\n")

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

while True:
    n = int(input())
    data = [0] * 10
    if n == 0:
        break

    for _ in range(n):
        in_data = int(input())
        data[in_data] += 1

    for d in data:
        if d == 0:
            print("-")
        else:
            print("*" * d)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

d_init = [0] * 10
while True:
    data = d_init[:]
    n = int(input())
    if n == 0:
        break

    for _ in range(n):
        in_data = int(input())
        data[in_data] += 1

    for d in data:
        if d == 0:
            print("-")
        else:
            print("*" * d)

Submission status: Accepted

Solution code:
def pr(t):
    for i in range(0,10):
        if t[i] == 0:
            print "-"
        else:
            print "*"*t[i]


while True:
    n = int(raw_input())
    t = {}
    for i in range(0,10):
        t[i] = 0

    if n == 0:
        break
    else:
        for i in range(0,n):
            c = int(raw_input())
            t[c] += 1
#        print t
        pr(t)

Submission status: Accepted

Solution code:
while True:
    n = int(input())
    if n == 0:
        break

    ice = [int(input()) for _ in range(n)]
    for i in range(10):
        print("*"*ice.count(i) + "-"*(ice.count(i)==0))

Submission status: Accepted

Solution code:
while True:
    n = int(input())
    if n == 0:
        break

    ice = [int(input()) for _ in range(n)]
    for i in range(10):
        nums = ice.count(i)
        print("*"*nums + "-"*(nums==0))

Submission status: Accepted

Solution code:
while True:
    ls = [0 for i in range(0,10)]
    n = int(input())
    if n == 0:
        break
    for i in range(n):
        ls[int(input())] +=1

    for i in ls:
        if i != 0:
            print("*"*i)
        else:
            print("-")

Submission status: Accepted

Solution code:
# Aizu Problem 0219: A Popular Ice-cream Shop

import sys, math, os, fractions

# read input:
PYDEV = os.environ.get('PYDEV')
if PYDEV=="True":
    sys.stdin = open("sample-input.txt", "rt")



while True:
    n = int(input())
    if n == 0:
        break
    cnt = [0] * 10
    for _ in range(n):
        cnt[int(input())] += 1
    for c in cnt:
        print('*' * c if c > 0 else '-')

Submission status: Accepted

Solution code:
# AOJ 0219: A Popular Ice-cream Shop
# Python3 2018.6.23 bal4u

while 1:
	n = int(input())
	if n == 0: break
	f = [0]*10
	for i in range(n): f[int(input())] += 1
	for i in range(10):
		if f[i] == 0: print('-')
		else: print('*'*f[i])

Submission status: Accepted

Solution code:
from collections import defaultdict

while True:
  n = int(input())
  if n == 0:
    break
  dic = defaultdict(int)
  for _ in range(n):
    dic[int(input())] += 1
  for i in range(10):
    if dic[i] != 0:
      print(dic[i] * "*")
    else:
      print("-")

Submission status: Accepted

Solution code:
while True:
    try:
        q={}
        a=input()
        if a==0:break
        for i in range(10): q[i]=0
        for i in range(a): q[input()]+=1
        for i in range(10):  print "*"*q[i] if q[i] != 0 else "-"
    except SyntaxError: pass

Submission status: Accepted

Solution code:
while True:
    try:
        n=input()
        if n==0:break
        L=[0]*10
        for i in range(n):
            L[input()]+=1
        for i in range(10):
            print "*"*L[i] if L[i]!=0 else "-"
    except SyntaxError:pass

Submission status: Accepted

Solution code:
while True:
    try:
	n = input()
	if n ==	0:break
        L = [0]	* 10
	for i in range(n):
            L[input()] += 1
    	for i in range(10):
            print "*" *	L[i] if	L[i] !=	0 else "-"
    except SyntaxError:pass

Submission status: Accepted

Solution code:
while 1:
    n = input()
    if n==0: break
    s = [0 for i in range(10)]
    for i in xrange(n):
        s[int(raw_input())]+=1
    for i in xrange(10):
        print '*'*s[i] if s[i]>0 else '-'

Submission status: Accepted

Solution code:
while 1:
	n=input()
	if n==0:break
	h=[0]*10
	for i in range(n):
		h[input()]+=1
	for i in range(10):
		print "*"*h[i] if h[i] else "-"

Submission status: Accepted

Solution code:
while 1:
	n=input()
	if n==0:break
	h=[0]*10
	for i in range(n):
		h[int(raw_input())]+=1
	for i in range(10):
		print "*"*h[i] if h[i] else "-"

Submission status: Accepted

Solution code:
while 1:
	n=input()
	if n==0:break
	h=[0]*10
	for i in range(n):
		h[int(raw_input())]+=1
	for i in h:
		print "*"*i if i else "-"

Submission status: Accepted

Solution code:
while 1:
	n=input()
	if n==0:break
	h=[0]*10
	for i in range(n):h[int(raw_input())]+=1
	for i in h:print "*"*i if i else "-"

Submission status: Accepted

Solution code:
while True:
    a = int(input())
    if a == 0:
        break
    else:
        b = [int(input()) for i in range(a)]
        j = 0
    for j in range(10):
        j = j+1
        c = b.count(j-1)
        if c == 0:
            print("-")
        else:
            print("*"*c)

Submission status: Accepted

Solution code:
while True:
    n=int(input())
    if n==0:
        break
    a=[0]*10
    for i in range(n):
        a[int(input())]+=1
    for i in range(10):
        if a[i]==0:
            print("-")
        else:
            print("*"*a[i])

Submission status: Accepted

Solution code:
while True:
    n=int(input())
    if n==0:break

    a=[0]*10
    
    for i in range(n):
        b=int(input())
        a[b]+=1
    for i in range(10):
        if a[i]==0:
            print("-")
        else:
            print("*"*a[i])

Submission status: Accepted

Solution code:
while 1:
	n=int(input())
	if n==0:
		break
	x=[0 for i in range(10)]
	for i in range(n):
		c=int(input())
		x[c]+=1
	for i in range(10):
		count='*'*x[i]
		if len(count)==0:
			print("-")
		else:
			print(count)

Submission status: Accepted

Solution code:
while True:
    n = int(input())
    if n == 0:
        break
    l = [0] * 10
    for i in range(n):
        a = int(input())
        l[a] += 1
    for a in l:
        if a > 0:
            print("*" * a)
        else:
            print("-")

Submission status: Accepted

Solution code:
while True:
    n=int(input())
    if n == 0:break
    ans = [0 for i in range(10)]
    for l in range(n):
        a = int(input())
        ans[a] += 1
    for i in range(10):
        if ans[i] == 0: print('-')
        else:
            for j in range(ans[i]):
                print('*',end='')
            print('')

Submission status: Accepted

Solution code:
while True :
    n=int(input())
    if n==0:
        break
    
    ice=list([0] * 10)
    for i in range(n):
        ice[int(input())] += 1
    

    for i in range(10):
        if ice[i] > 0:
            for j in range(ice[i]):
                print("*", sep="", end="")
            print( )
        else:
            print("-")

Submission status: Accepted

Solution code:
n=int(input())
#print(n)
while n!=0:
    icecream=[0]*10
    for i in range(n):
        a=int(input())
        icecream[a]+=1
    #print(icecream)
    for j in range(10):
        if icecream[j]==0:
            print('-')
        else:
            print('*'*icecream[j])
    n=int(input())

Submission status: Accepted

Solution code:
while True:
    a = [];
    n = int(input());
    if n == 0:
        break;
    for i in range(0,n):
        b = int(input());
        a.append(b);

    for i in range(0,10):
        c = a.count(i);
        if c == 0:
            print('-');
        else:
            for j in range(0,c):
                print('*',end = '');
            print();

Submission status: Accepted

Solution code:
while True:
    t=[]
    n=int(input())
    if n==0:
        break
    for i in range(n):
        m=int(input())
        t.append(m)
    a=t.count(0)
    if a>0:
        print(a*'*')
    else:
        print('-')
    b=t.count(1)
    if b>0:
        print(b*'*')
    else:
        print('-')
    c=t.count(2)
    if c>0:
        print(c*'*')
    else:
        print('-')
    d=t.count(3)
    if d>0:
        print(d*'*')
    else:
        print('-')  
    e=t.count(4)
    if e>0:
        print(e*'*')
    else:
        print('-')    
    f=t.count(5)
    if f>0:
        print(f*'*')
    else:
        print('-')    
    g=t.count(6)
    if g>0:
         print(g*'*')
    else:
        print('-')    
    h=t.count(7)
    if h>0:
         print(h*'*')
    else:
        print('-')    
    i=t.count(8)
    if i>0:
        print(i*'*')
    else:
        print('-')  
    j=t.count(9)
    if j>0:
        print(j*'*') 
    else:
        print('-')

Submission status: Accepted

Solution code:
while True:
    n = int(input())
    if n == 0:
        break
    cnt = [0]*10
    for i in range(n):
        c = int(input())
        cnt[c]+=1
    for c in cnt:
        if c > 0:
            print('*'*c)
        else:
            print('-')

Submission status: Accepted

Solution code:
while True:
    n=int(input())
    if n==0:
        break
    else:
        list=[0]*10
        for i in range(n):
            list[int(input())]+= 1
        for i in range(10):
            if list[i]==0:
                print('-')
            else:
                for j in range(list[i]):
                    print('*', end='')
                print()

Submission status: Accepted

Solution code:
while True:
    n=int(input())
    if n==0:
        break
    a=list(0 for i in range(10))
    for i in range(n):
        c=int(input())
        a[c]+=1
    
    for i in range(10):
        count='*'*a[i]
        if len(count)==0:
            print('-')
        else:
            print(count)

Submission status: Accepted

Solution code:
while True:
    n = int(input())
    if n == 0:
        break
    a=[0]*10
    for i in range(n):
        a[(int(input()))]+=1
        #print(a)
        
    for i in range(10):
        if a[i]==0:
            print("-")
        else:
            print("*"*a[i])

Submission status: Accepted

Solution code:
while 1:
    n=int(input())
    if n==0:break
    f=[0]*10
    for i in range(n):f[int(input())]+=1
    for i in range(10):
        if f[i]==0:print('-')
        else:print('*'*f[i])

Submission status: Accepted

Solution code:
while True:
    n=int(input())
    if n==0:
        break
    m=[0 for s in range(10)]
    for i in range(n):
        a=int(input())
        m[a]+=1
    for a in m:
        if a>0:
            print("*"*a)
        else:
            print("-")

Submission status: Accepted

Solution code:
while True :
    n = int(input())
    if n == 0 :
        break
    
    ice = list([0] * 10)
    for i in range(n) :
        ice[int(input())] += 1
    

    for i in range(10) :
        if ice[i] > 0 :
            for j in range(ice[i]) :
                print("*", sep="", end="")
            print()
        else :
            print("-")

Submission status: Accepted

Solution code:
while True:
    c=[0]*10
    n=int(input())
    if n==0:
        break
    for i in range(n):
        a=int(input())
        c[a]+=1
    for i in c:
        if i==0:
            print("-")
        else:
            print("*"*i)

Submission status: Accepted

Solution code:
while True:
	n = int(input())
	if n == 0:
	    break
	a = [0]*10
	for i in range(n):
	    a[int(input())] += 1
	for i in range(10):
		if a[i] == 0:
		    print('-')
		else:
		    print('*'*a[i])

Submission status: Accepted

Solution code:
while True:
  n = int(input())
  if n == 0:
    break
  c=[]
  for i in range(n):
    c.append(int(input()))
  for i in range(10):
    s = c.count(i)
    if s != 0:
      for j in range(s):
        print("*",end='')
      print()
    else:
      print('-')

Submission status: Accepted

Solution code:
for i in range(20):
    n=int(input())
    if n==0:break
    
    x=[]
    for j in range(n):
        a=int(input())
        x.append(a)
        
    for k in range(10):
        y=x.count(k)
        
        if y==0:
            print('-')
        else:
            print('*'*y)

Submission status: Accepted

Solution code:
import collections

while True :

    a=[]
    n=int(input())

    if n==0 :
        break

    for i in range (n) :
        x=int(input())
        a.append(x)

    a.sort()

    c = collections.Counter(a)


    for i in range(10):
        if c[i] == 0: 
            print('-')
        else: 
            print('*'*c[i])

Submission status: Accepted

Solution code:
while True:
        n =int (input())
        if n == 0:
            break
        data = [int(input()) for _ in range(n)]
        #print(data)
        i = 0
        for i in range(10):
            #print(i,data.count(i))
            if data.count(i) == 0:
                print('-')
            else:
                A = data.count(i)
                #print(A)
                for _ in range(A):
                    print('*', end="")
                print("")
            i = i + 1

Submission status: Accepted

Solution code:
while True:
    n = int(input())
    if n == 0 :
        break
    ice = list([0] * 10)
    for i in range(n) :
        a = int(input())
        ice[a] += 1
    
    for i in range(10) :
        if ice[i] > 0 :
            for j in range(ice[i]):
                print("*", sep="", end="")
            print("")
        else :
            print("-")

Submission status: Accepted

Solution code:
while 1:
	n = int(input())
	if n == 0: break
	f = [0]*10
	for i in range(n): f[int(input())] += 1
	for i in range(10):
		if f[i] == 0: print('-')
		else: print('*'*f[i])

Submission status: Accepted

Solution code:
while True:
    n = int(input())
    if n == 0:
        break
    
    data = [0 for i in range(10)]
    for i in range(n):
        data[int(input())] += 1
        
    for i in range(10):
        if data[i] == 0:
            print("-")
        else:
            print("*" * data[i])

Submission status: Accepted

Solution code:
while True:
    n=int(input())
    if n==0:
        break
    else:
        a=[int(input()) for i in range(n)]
        for j in range(10):
            x=a.count(j)
            if x==0:
                print('-')
            else:
                print('*'*x)

Submission status: Accepted

Solution code:
while True:
    n=int(input())
    if n== 0:
        break
    lst=[0]*10
    for i in range(n):
        x=int(input())
        lst[x]+= 1
    
    for x in lst:
        if x == 0:
            print('-')
        else:
            print('*'*x)

Submission status: Accepted

Solution code:
while 1:
	n = int(input())
	if n == 0: break
	f = [0]*10
	for i in range(n): f[int(input())] += 1
	for i in range(10):
		if f[i] == 0: print('-')
		else: print('*'*f[i])

Submission status: Accepted

Solution code:
while True:
    n = int(input())
    if n == 0:
        break
    cnt = [0] * 10

    for i in range(n):
        a = int(input())
        cnt[a] += 1

    for a in cnt:
        if a == 0:
            print('-')
        else:
            print('*'*a)

Submission status: Accepted

Solution code:
while True:
    n=int(input())
    if n==0:
        break
    list=[]
    for i in range(n):
        list.append(int(input()))
    for i in range(10):
        x=(list.count(i))
        if x==0:
            print('-')
        else:
            print('*'*x)

Submission status: Accepted

Solution code:
while True:
    n=int(input())
    
    if n==0:
        break
    else:
        x=[]
        for i in range(n):
            a=int(input())
            x.append(a)
        x1=sorted(x)
            
        b=0
        for j in range(0,10):
            s=x1.count(b)
                
            if s==0:
                print('-')
            else:
                print('*'*s)
            b+=1

Submission status: Accepted

Solution code:
while True:
    N=int(input())
    A=0
    B=0
    C=0
    D=0
    E=0
    F=0
    G=0
    H=0
    I=0
    J=0
    i=0
    j=0
    L=[]
    if N==0:
        break
    else:
        L=[int(input()) for _ in range (N)]
        for i in range (N):
            if L[i]==0:
                A+=1
            elif L[i]==1:
                B+=1
            elif L[i]==2:
                C+=1
            elif L[i]==3:
                D+=1
            elif L[i]==4:
                E+=1
            elif L[i]==5:
                F+=1
            elif L[i]==6:
                G+=1
            elif L[i]==7:
                H+=1
            elif L[i]==8:
                I+=1
            else:
                J+=1
        S=[A,B,C,D,E,F,G,H,I,J]
        
        
        for j in range(10):
            T=S[j]
            if T==0:
                print("-")
            else:
                k=0
                print("*"*T)

Submission status: Accepted

Solution code:
while True:
    n=int(input())
    if n==0:
        break
    m=[0 for i in range(10)]
    for i in range(n):
        a=int(input())
        m[a]+=1
    for a in m:
        if a>0:
            print("*"*a)
        else:
            print("-")

Submission status: Accepted

Solution code:
while True:
    n = int(input())
    if n == 0:
        break

    data = [0 for i in range(10)]
    for i in range(n):
        data[int(input())] += 1

    for i in range(10):
        if data[i] == 0:
            print("-")
        else:
            print("*" * data[i])

Submission status: Accepted

Solution code:
while True:
    n = int(input())
    if n == 0:
        break
    cnt = [0]*10
    for i in range(n):
        c = int(input())
        cnt[c]+=1
    for c in cnt:
        if c > 0:
            print('*'*c)
        else:
            print('-')

Submission status: Accepted

Solution code:
while True:
    n=int(input())
    if n==0:
        break
    x=[]
    for i in range(n):
        y=int(input())
        x.append(y)
    for j in range(10):
        a=x.count(j)
        if a==0:
            print("-")
        else:
            print(a*"*")

Submission status: Accepted

Solution code:
while True:
    n=int(input())
    if n==0:
        break
    else:
        lst=[]
        for i in range(n):
            c=int(input())
            lst.append(c)
        x=0
        for j in range(10):
            date=lst.count(x)
            if date==0:
                print("-")
            else:
                print("*"*date)
            x+=1

Submission status: Accepted

Solution code:
while True:
    n=int(input())
    x=[]
    if n==0:
        break
    else:
        for i in range(n):
            s=int(input())
            x.append(s)
        for i in range(0,10):
            a=x.count(i)
            if a==0:
                print("-")
            else:
                print("*"*a)

Submission status: Accepted

Solution code:
while True:
  n = int(input())
  if n == 0:
    break
  f = [0] * 10
  for i in range(n):
    f[int(input())] += 1
  for i in range(10):
    if f[i] == 0:
      print('-')
    else:
      print('*'*f[i])

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

for i in range(20):
    n = int(input())
    if n == 0:
        break
    a = [0]*10
    for i in range(n):
        b = int(input())
        a[b] += 1
    for b in a:
        if b > 0:
            print("*"*b)
        else:
            print("-")

Submission status: Accepted

Solution code:
while 1:
    n = int(input())
    if n == 0: break
    f = [0]*10
    for i in range(n): f[int(input())] += 1
    for i in range(10):
        if f[i] == 0: print('-')
        else: print('*'*f[i])

Submission status: Accepted

Solution code:
while True:
    n=int(input())
    list=[]
    if n==0:
        break
    else:
        for i in range (n):
            c=int(input())
            list.append(c)
        for i in range (0,10):
            x=list.count(i)
            if x==0:
                print("-")
            else:
                print("*"*x)

Submission status: Accepted

Solution code:
y=[0,1,2,3,4,5,6,7,8,9]

while True:
    n=int(input())
    if n==0:
        break
    x=[]
    z=[0,0,0,0,0,0,0,0,0,0]
    for i in range(n):
        c=int(input())
        x.append(c)
#    print(x)
    
    for i in range(10):
        for j in x:
            if y[i]==j:
                z[i]+=1
                
#    print(z)
    
    for k in range(10):
        if z[k]==0:
            print('-')
        else:
            for l in range(z[k]):
                print('*',end='')
            print()

Submission status: Accepted

Solution code:
while True:
    n=int(input())
    if n==0:
        break
    c=[]
    for i in range(n):
        c.append(int(input()))
    for j in range (10):
        p=c.count(j)
        if p==0:
            print('-')
        else:
            print((int(p))*"*")
    if n==0:
        break

Submission status: Accepted

Solution code:
while True:
    n=int(input())
    if n==0:
        break
    a=[]
    for i in range(n):
        x=int(input())
        a.append(x)
    
    count=[0]*10
    for j in a:
        count[j]+=1
    for k in range(10):
        if count[k]==0:
            print('-')
        else:
            print('*'*count[k])

Submission status: Accepted

Solution code:
while True:
    n=int(input())
    if n==0:
        break
    
    con=[0]*10
    
    for i in range(n):
        con[int(input())]+=1
        
    for i in range(10):
        if con[i]==0:
            print("-")
        else:
            for j in range(con[i]-1):
                print("*",end="")
            print("*")

Submission status: Accepted

Solution code:
while True:
    s = int(input())
    if s == 0: break
    a = [0 for i in range(10)]
    for i in range(s):
        n = int(input())
        a[n]+= 1
    for i in range(10):
        if a[i]>0:
            print('*'*a[i])
        else:
            print('-')

Submission status: Accepted

Solution code:
while True:
    n = int(input())
    if n == 0:
        break
    else:
        lst=[0]*10
        for i in range(n):
            lst[int(input())] += 1
        for i in range(10):
            if lst[i] == 0:
                print('-')
            else:
                for j in range(lst[i]):
                    print('*', end='')
                print()

Submission status: Accepted

Solution code:
while True:
    n=int(input())
    if n==0:
        break
    C=[]
    for i in range(n):
        C.append(int(input()))
    for i in range(10):
        D=(C.count(i))
        if D==0:
            print('-')
        else:
            print('*'*D)

Submission status: Accepted

Solution code:
while True:
    n=int(input())
    if n==0:
        break
    ice=list([0]*10)
    for i in range(n):
        c=int(input())
        ice[c]+=1
    for i in range(10):
        if ice[i]>0:
            for j in range(ice[i]):
                print(*'*',end='')
            print()
        else:
            print('-')

Submission status: Accepted

Solution code:
while True:
    a=int(input())
    if a==0:
        break
    else:
        L=[]
        for i in range(a):
            b=int(input())
            L.append(b)
            i+=1
        for j in range(10):
            c=L.count(j)
            if c==0:
                print("-")
            else:
                for k in range(c):
                    print("*",end="")
                    k+=1
                print()

Submission status: Accepted

Solution code:

while True:
    n=int(input())
    A=0
    B=0
    C=0
    D=0
    E=0
    F=0
    G=0
    H=0
    I=0
    J=0
    if n==0:
        break
    for i in range(n):
        a=int(input())
        if a==0:
            A=A+1
        elif a==1:
            B=B+1
        elif a==2:
            C=C+1
        elif a==3:
            D=D+1
        elif a==4:
            E=E+1
        elif a==5:
            F=F+1
        elif a==6:
            G=G+1
        elif a==7:
            H=H+1
        elif a==8:
            I=I+1
        else:
            J=J+1
    if A>0:
        print('*'*A)
    else:
        print('-')
    if B>0:
        print('*'*B)
    else:
        print('-')
    if C>0:
        print('*'*C)
    else:
        print('-')
    if D>0:
        print('*'*D)
    else:
        print('-')
    if E>0:
        print('*'*E)
    else:
        print('-')
    if F>0:
        print('*'*F)
    else:
        print('-')
    if G>0:
        print('*'*G)
    else:
        print('-')
    if H>0:
        print('*'*H)
    else:
        print('-')
    if I>0:
        print('*'*I)
    else:
        print('-')
    if J>0:
        print('*'*J)
    else:
        print('-')

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

while True:
    n=int(input())
    if n==0:
        break
    count=[0]*10
    for i in range(n):
        a=int(input())
        count[a]+=1
    for a in count:
        if a>0:
            print('*'*a)
        else:
            print('-')

Submission status: Accepted

Solution code:
while True:
    n = int(input())
    if n==0:
        break
    else:
        lst=[0]*10
        for i in range(n):
            lst[int(input())] += 1
        for i in range(10): #iはアイスの10種類　リストのn番目=iのアイスが何個売れた
            if lst[i]==0:
                print('-')
            else:
                for j in range(lst[i]):#jはある種類iがlst[i]回であったときforで*表示を回す
                    print('*',end='')#改行に気をつける
                print('')

Submission status: Accepted

Solution code:
while True:
    n=int(input())
    if n==0:
        break
    else:
        lst=[0]*10
        for i in range(n):
            lst[int(input())] += 1
        for i in range(10):
            if lst[i]==0:
                print('-')
            else:
                for j in range(lst[i]):
                    print('*', end='')
                print()

Submission status: Accepted

Solution code:
while 1:
    n=int(input())
    if n == 0:
        break
    c=[0]*10
    for i in range(n):
        c[int(input())]+=1
    for i in range(10):
        if c[i] != 0:
            print('*'*c[i])
        else :
            print('-')