Go: package main

import (
	"bufio"
	"os"
	"strconv"
	"fmt"
)

var scanner = bufio.NewScanner(os.Stdin)

func main() {
	for scanner.Scan() {
		n, _ := strconv.Atoi(scanner.Text())
		if n == 0 {
			break
		}
		ans := make([]int, 7)
		for i := 0; i < n; i++ {
			scanner.Scan()
			a, _ := strconv.Atoi(scanner.Text())
			switch {
			case a < 10:
				ans[0]++
			case 10 <= a && a < 20:
				ans[1]++
			case 20 <= a && a < 30:
				ans[2]++
			case 30 <= a && a < 40:
				ans[3]++
			case 40 <= a && a < 50:
				ans[4]++
			case 50 <= a && a < 60:
				ans[5]++
			case 60 <= a:
				ans[6]++
			}
		}
		for i := range ans {
			fmt.Println(ans[i])
		}
	}
}

Python: # -*- coding: utf-8 -*-
import sys
'import math'
while 1:
    n=int(input())
    if n==0: sys.exit()
    arr=[0]*7
    while n:
        a=int(input())
        if a>60: a=61
        arr[int(a/10)]+=1
        n-=1
    for i in range(len(arr)):
        print(arr[i])

Python: while True:

    input_count = int(input())

    if input_count == 0:
        break

    data = [int(input()) for _ in range(input_count)]

    counter = [0] * 12

    for item in data:
        counter[item // 10] += 1

    counter[6] = sum(counter[6:])
    counter = counter[:7]

    counter = [str(item) for item in counter]
    print("\n".join(counter))

Python: while True:
    num = int(input())
    if num == 0:
        break
    L = [0] * 7
    for _ in range(num):
        L[min(6,int(input())//10)] += 1
    
    print("\n".join(map(str,L)))

Python: n=int(input())
x=[0 for i in range(7)]
while True:
  if n==0:
    break
  for i in range(n):
    a=int(input())
    if 0<=a<10:
      x[0]+=1
    elif 10<=a<20:
      x[1]+=1
    elif 20<=a<30:
      x[2]+=1
    elif 30<=a<40:
      x[3]+=1
    elif 40<=a<50:
      x[4]+=1 
    elif 50<=a<60:
      x[5]+=1
    else:
      x[6]+=1
  for i in range(7):
    if x[i]==0:
      print(0)
    else:
      print(x[i])

Python: while True:
	n = int(input())
	ans = [0 for _ in range(7)]
	for _ in range(n):
		age = int(input())
		if age < 10:
			ans[0] += 1
		elif age < 20:
			ans[1] += 1
		elif age < 30:
			ans[2] += 1
		elif age < 40:
			ans[3] += 1
		elif age < 50:
			ans[4] += 1
		elif age < 60:
			ans[5] += 1
		else:
			ans[6] += 1
	for a in ans:
		print(a)

Python: def cls(i):
    if i < 60:
        return i // 10
    else:
        return 6

def answer(n,d):
    tbl = [ 0 for i in range(7) ]
    for i in range(n):
        c = cls(d[i])
        tbl[c] += 1
    return tbl

while True:
    n = int(input())
    if n == 0:
        break
    d = [int(input()) for i in range(n)]
    o = answer(n,d)
    for i in range(7):
        print(o[i])

Python: n=int(input())
x=[0 for i in range(7)]
while True:
  if n==0:
    break
  for i in range(n):
    a=int(input())
    if 0<=a<10:
      x[0]+=1
    elif 10<=a<20:
      x[1]+=1
    elif 20<=a<30:
      x[2]+=1
    elif 30<=a<40:
      x[3]+=1
    elif 40<=a<50:
      x[4]+=1 
    elif 50<=a<60:
      x[5]+=1
    else:
      x[6]+=1
  for i in range(7):
    if x[i]==0:
      print(0)
    else:
      print('{}'.format(x[i]))

Python: while 1:
    n = int(input())
    if n == 0:
        break
    h = [0, 0, 0, 0, 0, 0, 0 ]
    for _ in range(n):
        a = int(input())//10
        if a > 6:
            a = 6
        h[a] += 1
    for i in range(7):
        print(h[i], sep='\n')

Python: while True:
  n =int(input())
  if n==0:
    break
  a0=a1=a2=a3=a4=a5=a6=0
  for i in range(n):
    a=int(input())
    if a<10:
      a0+=1
    elif a<20:
      a1+=1
    elif a<30:
      a2+=1
    elif a<40:
      a3+=1
    elif a<50:
      a4+=1
    elif a<60:
      a5+=1
    else:
      a6+=1
  print(a0)
  print(a1)                        
  print(a2)
  print(a3)
  print(a4)
  print(a5)
  print(a6)

Python: # AOJ 0184 Tsuruga Castle
# Python3 2018.6.19 bal4u

while True:
	n = int(input())
	if n == 0: break
	f = [0]*14
	for i in range(n): f[int(input())//10] += 1
	f[6] = sum(f[6:14])
	print(*f[0:7], sep='\n')

Python: while True:
    n = int(input())
    if n == 0: break
    age = [0] * 7
    for _ in range(n):
        x = int(input())
        if x < 10:
            age[0] += 1
        elif 10 <= x < 20:
            age[1] += 1
        elif 20 <= x < 30:
            age[2] += 1
        elif 30 <= x < 40:
            age[3] += 1
        elif 40 <= x < 50:
            age[4] += 1
        elif 50 <= x < 60:
            age[5] += 1
        elif 60 <= x:
            age[6] += 1
    print('\n'.join(map(str, age)))

Python: while True:
    c = [0] * 7
    n = input()
    if not n:
        break
    for i in range(n):
        c[min(input() // 10, 6)] += 1
    for i in c:
        print(i)

Python: # -*- coding: utf-8 -*-
"""
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0184

"""
import sys
from sys import stdin
from collections import defaultdict
input = stdin.readline


def main(args):
    while True:
        n = int(input())
        if n == 0:
            break
        visitors = defaultdict(int)

        for _ in range(n):
            age = int(input())
            if age < 10:
                visitors['under10'] += 1
            elif age < 20:
                visitors['10s'] += 1
            elif age < 30:
                visitors['20s'] += 1
            elif age < 40:
                visitors['30s'] += 1
            elif age < 50:
                visitors['40s'] += 1
            elif age < 60:
                visitors['50s'] += 1
            else:
                visitors['60s+'] += 1

        print(visitors['under10'])
        print(visitors['10s'])
        print(visitors['20s'])
        print(visitors['30s'])
        print(visitors['40s'])
        print(visitors['50s'])
        print(visitors['60s+'])


if __name__ == '__main__':
    main(sys.argv[1:])

Python: judge = [10, 20, 30, 40, 50, 60, 121]

while True:

    input_count = int(input())

    if input_count == 0:
        break

    data = [int(input()) for _ in range(input_count)]
    counter = [0] * 7

    for item in data:

        for index, j in enumerate(judge):
            if item < j:
                counter[index] += 1
                break

    counter = [str(item) for item in counter]
    print("\n".join(counter))

Python: n=int(input())
while True:
  if n==0:
    break
  x=[0 for i in range(7)]
  for i in range(n):
    a=int(input())
    if 0<=a<10:
      x[0]+=1
    elif 10<=a<20:
      x[1]+=1
    elif 20<=a<30:
      x[2]+=1
    elif 30<=a<40:
      x[3]+=1
    elif 40<=a<50:
      x[4]+=1 
    elif 50<=a<60:
      x[5]+=1
    else:
      x[6]+=1
  for i in range(7):
    if x[i]==0:
      print(0)
    else:
      print('{}'.format(x[i]))

Python: while True:
    n = int(input())
    if n == 0:
        break
    a = [int(input()) for _ in range(n)]
    for i in range(0, 60, 10):
        print(len(list(filter(lambda x: i <= x < i+10, a))))
    print(len(list(filter(lambda x: 60 <= x <=120, a))))

Python: while True:
    n = int(input())
    if not n:
        break
    d = {k:[] for k, v in enumerate(range(7))}
    for _ in range(n):
        age = int(input())
        if age >= 10 and age < 20:
            d[1].append(1)
        elif age >= 20 and age < 30:
            d[2].append(1)
        elif age >= 30 and age < 40:
            d[3].append(1)
        elif age >= 40 and age < 50:
            d[4].append(1)
        elif age >= 50 and age < 60:
            d[5].append(1)
        elif age >= 60:
            d[6].append(1)
        else:
            d[0].append(1)
    for k, v in d.items():
        print(sum(v))

Python: n=int(input())
x=[0 for i in range(7)]
for i in range(n):
  a=int(input())
  if 0<=a<10:
    x[0]+=1
  elif 10<=a<20:
    x[1]+=1
  elif 20<=a<30:
    x[2]+=1
  elif 30<=a<40:
    x[3]+=1
  elif 40<=a<50:
    x[4]+=1 
  elif 50<=a<60:
    x[5]+=1
  else:
    x[6]+=1
for i in range(7):
  if x[i]==0:
    print(0)
  else:
    print('{}'.format(x[i]))