Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

func main() {
	result := make([]int, 6)
	scanner.Scan()
	n, _ := strconv.Atoi(scanner.Text())
	for i := 0; i < n; i++ {
		scanner.Scan()
		h, _ := strconv.ParseFloat(scanner.Text(), 64)
		if h < 165.0 {
			result[0]++
		} else if 165.0 <= h && h < 170.0 {
			result[1]++
		} else if 170.0 <= h && h < 175.0 {
			result[2]++
		} else if 175.0 <= h && h < 180.0 {
			result[3]++
		} else if 180.0 <= h && h < 185.0 {
			result[4]++
		} else if 185.0 <= h {
			result[5]++
		}
	}
	for i := 0; i < 6; i++ {
		fmt.Printf("%d:", i+1)
		for j := 0; j < result[i]; j++ {
			fmt.Print("*")
		}
		fmt.Println()
	}
}

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

int main(){
  int n, out[6]={0};
  double d;
  cin >> n;
  while(n--){
    cin >> d;
    if(d<165.0)
      out[0]++;
    else if(d<170.0)
      out[1]++;
    else if(d<175.0)
      out[2]++;
    else if(d<180.0)
      out[3]++;
    else if(d<185.0)
      out[4]++;
    else
      out[5]++;
  }
  for(int i=0; i<6; i++){
    cout << i+1 << ":";
    for(int j=0; j<out[i]; j++)
      cout << "*";
    cout << endl;
  }
  return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;

#define pb push_back
#define fr first
#define sc second
typedef vector<int> vi;
typedef pair<int,int> pii;
typedef pair<int,pii> pip; 
const int INF = (1<<25);
const int dx[]={1,0,-1,0},dy[]={0,-1,0,1};

int main() {

  int n;
  int data[6]={0};
  cin>> n;
  while(n--) {
    double height;
    cin>> height;

    if(height < 165) data[0]++;
    else if(height < 170) data[1]++;
    else if(height < 175) data[2]++;
    else if(height < 180) data[3]++;
    else if(height < 185) data[4]++;
    else data[5]++;

  }

  for(int i=0; i<6; i++) {
    cout<< i+1<< ':';
    for(int j=0; j<data[i]; j++) {
      cout<< '*';
    }
    cout<< endl;
  }

}

C++: #include <stdio.h>
int main(){
	int n,i,g[6]={0},x,y;
	float f;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%f",&f);
		if(f<165.0)g[0]++;
		else if(f>=165.0 && f<170.0)g[1]++;
		else if(f>=170.0 && f<175.0)g[2]++;
		else if(f>=175.0 && f<180.0)g[3]++;
		else if(f>=180.0 && f<185.0)g[4]++;
		else if(f>=185.0 && f<190.0)g[5]++;
	}
	for(x=0;x<6;x++)
	{
		printf("%d:",x+1);
		for(y=0;y<g[x];y++)
		printf("*");
		puts("");
	}
	return 0;
}

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

int main(){
  int n;
  while(1){
    cin >> n;
    if(n==0) break;

    int s[15]={};
    for(int i = 0; i < n; i++) cin >> s[i];
    
   
    int ans = 0;
    int c[15];
    while(1){
      bool issame = true;
      for(int i = 0; i < n; i++){
	int sum = 0;	
	for(int j = 0; j < n; j++){
	  if(s[i] == s[j] ) sum++;
	}
	if(s[i] != sum ) issame = false;
	c[i] = sum;
      }
      if(issame){
	cout << ans << endl;
      	for(int j = 0; j < n; j++){
	  if(j == n-1) cout << s[j] << "\n";
	  else cout << s[j] << " ";
	}
	break;
      }
      for(int j = 0; j < n; j++){
	s[j] = c[j];
      }
      ans++;
    }
  }
  
  return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <string>
#include <sstream>
#include <algorithm>
#include <math.h>
//#include <map>
#include <vector>

using namespace std;



int main()
{
	int n;
	int bunpu[6];
	double sintyou;
	
	for (int i=0; i<6; i++) bunpu[i] = 0;
	cin >> n;
	for (int i=0; i<n; i++)
	{
		cin >> sintyou;
		if (sintyou < 165.0)
		{
			bunpu[0]++;
		} else if (165.0 <= sintyou && sintyou < 170.0) {
			bunpu[1]++;
		} else if (170.0 <= sintyou && sintyou < 175.0) {
			bunpu[2]++;
		} else if (175.0 <= sintyou && sintyou < 180.0) {
			bunpu[3]++;
		} else if (180.0 <= sintyou && sintyou < 185.0) {
			bunpu[4]++;
		} else if (185.0 <= sintyou) {
			bunpu[5]++;
		}
	}
	for (int i=0; i<6; i++)
	{
		cout << i + 1 << ":";
		for (int j=0; j<bunpu[i]; j++)
		{
			cout << "*";
		}
		cout << endl;
	}
	
	return 0;
}

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

int main()
{
	int n, i, j;
	double d;
	vector<int> num(6);
	cin>>n;
	while (cin>>d) {
		if (d < 165.0) num[0]++;
		else if (d < 170.0) num[1]++;
		else if (d < 175.0) num[2]++;
		else if (d < 180.0) num[3]++;
		else if (d < 185.0) num[4]++;
		else num[5]++;
	}
	for (i = 0; i < 6; i++) {
		cout<<i+1<<":";
		for (j = 0; j < num[i]; j++) cout<<"*";
		cout<<endl;
	}
	return 0;
}

C++: #include <iostream>
#include <vector>

using namespace std;

int main(){
  int n;
  cin>>n;
  vector<int> dist(6);
  for(int i=0;i<n;i++){
    double data;cin>>data;
    for(int j=0;j<dist.size();j++){
      if((j==dist.size()-1)?1:data<(165+5*j)){
        dist[j]++;break;
      }
    }
  }
  for(int i=0;i<dist.size();i++){
    cout<<i+1<<":";
    for(int j=0;j<dist[i];j++) cout<<'*';
    cout<<endl;
  }
}

C++: #include <iostream>
using namespace std;
string str[7];

void distribution(double h) {
  if(h < 165.0) {
    str[1] += "*";
    return;
  }
  if(h < 170.0) {
    str[2] += "*";
    return;
  }
  if(h < 175.0) {
    str[3] += "*";
    return;
  }
  if(h < 180.0) {
    str[4] += "*";
    return;
  }
  if(h < 185.0) {
    str[5] += "*";
    return;
  }
  else {
    str[6] += "*";
    return;
  }
}

int main() {
  int n;
  double h;
  cin >> n;
  for(int i=0;i<n;i++) {
    cin >> h;
    distribution(h);
  }
  for(int i=1;i<7;i++) {
    cout << i << ":" << str[i] << endl;
  }
}

C++: #include <iostream>
#include <string>
#include <cstdio>
using namespace std;
int main(){
	int n,cnt[6]={0};
	float h;
	cin>>n;
	for(int i=0;i<n;i++){
		cin>>h;
		if(h<165.0){
			cnt[0]++;
		}else if(h<170.0){
			cnt[1]++;
		}else if(h<175.0){
			cnt[2]++;
		}else if(h<180.0){
			cnt[3]++;
		}else if(h<185.0){
			cnt[4]++;
		}else{
			cnt[5]++;
		}
	}
	for(int i=0;i<6;i++){
		cout<<i+1<<":";
		for(int j=0;j<cnt[i];j++){
			cout<<"*";
		}
		cout<<endl;
	}
	return 0;
}

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


int hist[10];

int main(){
	int n;
	cin>>n;
	for(int i=0;i<n;i++){
		double a;
		cin>>a;
		if(a<165.0){
			hist[0]++;
		}else if(a<170.0){
			hist[1]++;
		}else if(a<175.0){
			hist[2]++;
		}else if(a<180.0){
			hist[3]++;
		}else if(a<185.0){
			hist[4]++;
		}else hist[5]++;
	}
	for(int i=0;i<6;i++){
		cout<<i+1<<':';
		for(int j=0;j<hist[i];j++)cout<<'*';
		cout<<endl;
	}
	return 0;
}

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

int main(){
  int n;
  while(1){
    cin >> n;
    if(n==0) break;

    int s[15]={};
    for(int i = 0; i < n; i++) cin >> s[i];
    
   
    int ans = 0;
    int c[15];
    while(1){
      bool issame = true;
      for(int i = 0; i < n; i++){
	int sum = 0;	
	for(int j = 0; j < n; j++){
	  if(s[i] == s[j] ) sum++;
	}
	if(s[i] != sum ) issame = false;
	c[i] = sum;
      }
      if(issame){
	cout << ans << endl;
      	for(int j = 0; j < n; j++){
	  if(j == n-1) cout << s[j] << "\n";
	  else cout << s[j] << " ";
	}
	break;
      }
      for(int j = 0; j < n; j++){
	s[j] = c[j];
      }
      ans++;
    }
  }
  
  return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;

#define for_(i,a,b) for(int i=(a);i<(b);++i)

int main() {
	int n, cnt[6] = {0};
	double mn = 160;
	
	cin >> n;
	
	for_(i,0,n) {
		double c;
		cin >> c;
		int p = min(5, int((c - mn) / 5.));
		++cnt[p];
	}
	
	for_(i,0,6) {
		cout << i + 1 << ":";
		for_(j,0,cnt[i]) cout << "*";
		cout << endl;
	}
}