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 <bits/stdc++.h>
#define rep(i,l,n) for(int i=l;i<n;i++)
#define rer(i,l,n) for(int i=l;i<=n;i++)
#define all(a) a.begin(),a.end()
#define o(a) cout<<a<<endl
#define fi first
#define se second
using namespace std;
typedef long long ll;
typedef vector<int> vint;
typedef pair<int,int> pii;

int main(){
	int n,d[6]={};
	double h;
	cin>>n;
	rep(i,0,n){
		cin>>h;
		h-=165;
		if(h<0) d[0]++;
		else if(h<5) d[1]++;
		else if(h<10) d[2]++;
		else if(h<15) d[3]++;
		else if(h<20) d[4]++;
		else d[5]++;
	}
	rep(i,0,6){
		cout<<i+1<<":";
		rep(j,0,d[i]) cout<<"*";
		cout<<endl;
	}
}

C++: #define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES

#include <stdio.h>
#include <ctype.h>
#include <string>
#include <iostream>
#include <vector>
#include <stack>
#include <fstream>
#include <sstream>
#include <queue>
#include <exception>
#include <cmath>
#include <numeric>
#include <map>
#include <algorithm>
#include <bitset>
#include <set>
#include <functional>

#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--)
#define REP(i,n) for (int i=0;i<(n);i++)
#define RREP(i,n) for (int i=(n)-1;i>=0;i--)

using namespace std;
typedef long long int lint;

bool AOJ0136()
{
	int n;
	cin >> n;
	double h;
	int dist[6] = { 0 };
	REP(i, n) {
		cin >> h;
		if (h < 165) dist[0]++;
		else if (h < 170) dist[1]++;
		else if (h < 175) dist[2]++;
		else if (h < 180) dist[3]++;
		else if (h < 185) dist[4]++;
		else dist[5]++;
	}
	REP(i, 6) {
		cout << i + 1 << ":";
		REP(j, dist[i]) {
			cout << "*";
		}
		cout << endl;
	}

	return true;
}

int main()
{
	AOJ0136();

	return 0;
}

C++: #include <iostream>

using namespace std;

int main(){
  int n;
  int cnt[6] = {0};
  double a;

  cin >> n;
  while(n--){
    cin >> a;
    if(a < 165) cnt[0]++;
    else if(a < 170) cnt[1]++;
    else if(a < 175) cnt[2]++;
    else if(a < 180) cnt[3]++;
    else if(a < 185) 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>
#include <sstream>
#include <iomanip>
#include <string>
#include <cstdlib>
using namespace std;

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

C++: #include <iostream>
using namespace std;
int main(){
    int n;
    double data;
    int num[6];
    for (int i = 0; i < 6; i++) {
        num[i] = 0;
    }
    cin >> n;
    while(n--) {
        cin >> data;
        for (int i = 0; i < 6; i++) {
            if (data < (165.0+(i*5))) {
                ++num[i];
                break;
            }
        }
    }
    for(int i = 0; i < 6; ++i) {
        cout << i+1 << ":";
        for(int j = 0; j < num[i]; ++j) {
            cout << "*";
        }
        cout << endl;
    }
}

C++: #include<stdio.h>

int main()
{
int n[8]={},N,x,y;


scanf("%d",&N);
for(int i=0;i<N;i++){
scanf("%d.%d",&x,&y);
if(185<=x)n[6]++;
else if(180<=x)n[5]++;
else if(175<=x)n[4]++;
else if(170<=x)n[3]++;
else if(165<=x)n[2]++;
else if(165>x)n[1]++;
}
for(int i=1;i<=7;i++)
{
printf("%d:",i);
for(int j=0;j<n[i];j++){
printf("*");
}
printf("\n");
}
return 0;
}

C++: #include<iostream>

using namespace std;

int main()
{
	int n;	cin>>n;
	int buc[6]={0};
	while(n--){
		double t;	cin>>t;
		if     (t<165)	buc[0]++;
		else if(t<170)	buc[1]++;
		else if(t<175)	buc[2]++;
		else if(t<180)	buc[3]++;
		else if(t<185)	buc[4]++;
		else			buc[5]++;
	}
	for(int i=0;i<6;i++){
		cout<<i+1<<":";
		for(int j=0;j<buc[i];j++)	cout<<'*';
		cout<<endl;
	}
	return 0;
}

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

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

C++: #define _CRT_SECURE_NO_WARNINGS
#include "bits/stdc++.h"
using namespace std;
#define rep(i, n) for(int i=0; i<(n); ++i)
#define FOR(i, m, n) for(int i=(m); i<(n); ++i)
#define sz(x) ((int)(x).size())
#define all(x) (x).begin(),(x).end()
#define mp make_pair
#define pb push_back
#define Cout(x) cout << (x) << endl
#define Cout2(x, y) cout << (x) << " " << (y) << endl
#define dump(x) cout << #x << " = " << (x) << endl;
#define forauto(i, a) for(auto i : a)cout << i << " "; puts("");
typedef long long LL;
typedef vector<int> VI;
typedef vector<LL> VL;
typedef vector<string> VS;
typedef vector<bool> VB;
typedef vector<vector<int>> VVI;
typedef pair<int, int> PII;
const int inf = 1e9;
const double pi = acos(-1.0);

string re(char c, int n) {
	string ret;
	ret.assign(n, c);
	return ret;
}

int main() {
	int n; cin >> n;
	VI data(6);
	rep(i, n) {
		double h; cin >> h;

		int a;
		if (h < 165.0)a = 0;
		else if (h < 170.0)a = 1;
		else if (h < 175.0)a = 2;
		else if (h < 180.0)a = 3;
		else if (h < 185.0)a = 4;
		else a = 5;

		data[a]++;
	}

	rep(i, 6)cout << i + 1 << ":" << re('*', data[i]) << endl;
}

C++: #include <iostream>
#include <cstdio>
using namespace std;
int main(void){
  int n,count[6]={0};
  double a;

  cin>>n;
  for(int i=0;i<n;i++){
    cin>>a;
    if(a>185.0)a=185.0;
    count[(int)((a-160.0)/5.0)]++;
  }
  for(int i=0;i<6;i++){
    printf("%d:",i+1);
    for(int j=0;j<count[i];j++){
      printf("*");
    }
    printf("\n");
  }
  return 0;
}

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

#define repeat(n, i) for(int i=0; i < (n); i++) 

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