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])
		}
	}
}

C++: #include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
//#include <utility>
#include <set>
#include <iostream>
//#include <memory>
#include <string>
#include <vector>
#include <algorithm>
//#include <functional>
#include <sstream>
//#include <deque>
#include <complex>
#include <stack>
#include <queue>
#include <cstdio>
//#include <cctype>
#include <cstring>
//#include <ctime>
#include <iterator>
#include <bitset>
//#include <numeric>
//#include <list>
//#include <iomanip>

#if __cplusplus >= 201103L
#include <array>
#include <tuple>
#include <initializer_list>
#include <unordered_set>
#include <unordered_map>
#include <forward_list>

#define cauto const auto&
#else

#endif

using namespace std;


namespace{
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;

typedef vector<int> vint;
typedef vector<vector<int> > vvint;
typedef vector<long long> vll, vLL;
typedef vector<vector<long long> > vvll, vvLL;

#define VV(T) vector<vector< T > >

template <class T>
void initvv(vector<vector<T> > &v, int a, int b, const T &t = T()){
    v.assign(a, vector<T>(b, t));
}

template <class F, class T>
void convert(const F &f, T &t){
    stringstream ss;
    ss << f;
    ss >> t;
}


#define reep(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n) reep((i),0,(n))
#define ALL(v) (v).begin(),(v).end()
#define PB push_back
#define F first
#define S second
#define mkp make_pair
#define RALL(v) (v).rbegin(),(v).rend()


#define MOD 1000000007LL
#define EPS 1e-8
static const int INF=1<<24;

void mainmain(){
	int n;
	while(cin>>n,n){
		vint v(7,0);
		rep(i,n){
			int a;
			cin>>a;
			a/=10;
			if(a>=6){
				v[6]++;
			}
			else{
				v[a]++;
			}
		}
		rep(i,7){
			cout<<v[i]<<endl;
		}
	}
}



}
main() try{
    mainmain();
}
catch(...){
}

C++: #include <iostream>
#include <cstdio>
using namespace std;
int main(void){
  int n;
  int a;

  while(cin>>n,n!=0){
    int count[7]={0};
    for(int i=0;i<n;i++){
      cin>>a;
      if(a>60)a=60;
      count[(int)a/10]++;
    }
    for(int i=0;i<7;i++){
      printf("%d\n",count[i]);
    }
  }
  return 0;
}

C++: #include <iostream>

using namespace std;

int main()
{
    int n;

    while (cin >> n) {
        if (!n)
            break;

        int old;
        int num[7] = {0};

        for (int i = 0; i < n; i++) {
            cin >> old;

            if (old >= 60)
                old = 60;
            num[old / 10]++;
        }
    
        for (int i = 0; i < 7; i++) 
            cout << num[i] << endl;
    }

    return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int main(){

    int n;
    while(1){
        scanf("%d",&n);
        if(n == 0) break;
        int age[10] = {0};
        for(int i = 0; i < n; i++){
            int x;
            scanf("%d",&x);
            if(x < 10) age[0]++;
            if(x >= 10 && x < 20) age[1]++;
            if(x >= 20 && x < 30) age[2]++;
            if(x >= 30 && x < 40) age[3]++;
            if(x >= 40 && x < 50) age[4]++;
            if(x >= 50 && x < 60) age[5]++;
            if(x >= 60) age[6]++;
        }
        for(int i = 0; i < 7; i++){
            printf("%d\n",age[i]);
        }
    }

    return 0;
}

C++: #include <stdio.h>

int main(void)
{
int data[7] = {0};
int n;
int d;

scanf("%d", &n);

for (int i = 0; i < n; i++){
scanf("%d", &d);

if (d >= 60){
data[6]++;
}
else {
data[d / 10]++;
}

for (int i = 0; i < 7; i++){
printf("%d\n", data[i]);
}

return (0);
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main(void){
  int n,d,layer[10]={0};
  while(cin>>n,n!=0){
    for(int i=0;i<n;i++){
      cin>>d;
      layer[d/10]++;
      if(6<d/10)layer[6]++;
    }
    for(int i=0;i<7;i++){
      cout<<layer[i]<<endl;
      layer[i]=0;
    }
  }
}

C++: #include<iostream>
#include<memory.h>
using namespace std;
int main()
{
	int n,m;
	int in[7] = { 0 };
	while (true){
		cin >> m;
		if (m == 0)break;
		memset(in, 0, sizeof(in));
		for (int i = 0; i < m; i++){
			cin >> n;
			if (n < 10)in[0]++;
			else if (n < 20)in[1]++;
			else if (n < 30)in[2]++;
			else if (n < 40)in[3]++;
			else if (n < 50)in[4]++;
			else if (n < 60)in[5]++;
			else in[6]++;
		}
		for (int i = 0; i < 7; i++){
			cout << in[i] << endl;
		}
	}
}

C++: #include <iostream>
using namespace std;

int judge(int);

int main(void){
  int n,age;

  for(;;){
    int cnt[7]={0};

    cin >> n;
    for( int i = 0 ; i < n ; i++ ){
      cin >> age;
      cnt[judge(age)]++;
    }

    for( int i = 0 ; i < n ; i++ ) cout << cnt[i] << endl;
  }

  return 0;
}

  int judge(int age){
   
    switch(age/10){
    case 0:return 0;
    case 1:return 1;
    case 2:return 2;
    case 3:return 3;
    case 4:return 4;
    case 5:return 5;
    }
    return 6;

}

C++: #include <iostream>

using namespace std;

int main(){
	int year[10]={},n,f,num;
	while(cin>>n,n!=0){
		for(int i=0;i<10;i++)year[i]=0;
		for(int i=0;i<n;i++){
			cin>>num;
			f=0;
			while(num>10){
				f++;
				num-=10;
			}
			if(f>6)year[6]++;
			else year[f]++;
		}
		for(int i=0;i<7;i++)cout<<year[i]<<endl;
	}
}

C++: #include<stdio.h>

int main(){
	int n,ni[7],i,to;
	while(0<=scanf("%d",&n)){
		if(n==0)break;
		
		for(i=0;i<7;i++)ni[i]=0;
		
		for(i=0;i<n;i++){
			scanf("%d",&to);
			if(to<10){
				++ni[0];
			}else if(to<20){
				++ni[1];
			}else if(to<30){
				++ni[2];
			}else if(to<40){
				++ni[3];
			}else if(to<50){
				++ni[4];
			}else if(to<60){
				++ni[5];
			}else{
				++ni[6];
			}
		}
		for(i=0;i<7;i++)printf("%d\n",ni[i]);
	}
	return 0;
}

C++: #include <iostream>
#include <algorithm>
using namespace std;

int main()
{
	int n;
	while( cin >> n && n ){
		int age[ 7 ] = {0};
		for( int i = 0; i < n; ++i ){
			int a;
			cin >> a;
			a /= 10;
			++age[ min( a, 6 ) ];
		}
		for( int i = 0; i < 7; ++i ){
			cout << age[ i ] << endl;
		}
	}

	return 0;
}

C++: #include<stdio.h>
int tosi[7];
int i,n,j,nen,toshi,t;
int main(void){
	while(1){
		for(i=0;i<7;i++){
			tosi[i]=0;
		}
		scanf("%d",&n);
		if(n==0) break;
		for(i=0;i<n;i++){
			scanf("%d",&nen);
			toshi=10,t=0;
			for(j=0;j<6;j++){
				if(nen<toshi){
					tosi[t]++;
					break;
				}
				toshi+=10;
				t++;
				if(toshi==70){
					tosi[t]++;
		//		printf("tt%d\n",t);
				}
			}
		}
		for(i=0;i<7;i++){
			printf("%d\n",tosi[i]);
		}
	}
	return 0;
}

C++: #include <iostream>

using namespace std;
 
int judge(int);
 
int main()
{
    int n, age;
 
    while (cin >> n, n) {
	int cnt[7] = {0};
	for (int i = 0; i < n; i++) {
	    cin >> age;
	    cnt[judge(age)]++;
	}
	for (int i = 0; i < 7; i++) {
	    cout << cnt[i] << endl;
	}
    }
    return 0;
}
 
int judge(int age)
{
    return min(age/10, 6);
}