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>
using namespace std;
int main(){
  int n;
  cin >> n;
  int d[6]={};
  int i,j,k;
  double x;
  for(i=0;i<n;i++){
    cin >> x;
    if(x<165.0) d[0]++;
    else if(x<170.0) d[1]++;
    else if(x<175.0) d[2]++;
    else if(x<180.0) d[3]++;
    else if(x<185.0) d[4]++;
    else d[5]++;
  }
  for(i=0;i<6;i++){
    cout << (i+1) << ":";
    for(j=0;j<d[i];j++) cout << "*";
    cout << endl;
  }
  return 0;
}

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

int a[6];

void count(double h) {
  int x = (h - 160.0) * 0.2;
  if(x < 1) a[0]++;
  else if(1 <= x && x < 2) a[x]++;
  else if(2 <= x && x < 3) a[x]++;
  else if(3 <= x && x < 4) a[x]++;
  else if(4 <= x && x < 5) a[x]++;
  else a[5]++;
}

int main() {
  int n;
  cin >> n;
  
  double h;
  for(int i = 0; i < n; ++i) {
	cin >> h;
	count(h);
  }

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

C++: #define _USE_MATH_DEFINES
#include <iostream>
#include <complex>
#include <algorithm>
#include <vector>
#include <stack>
#include <string>
#include <queue>
#include <cmath>
#include <math.h>
#include <numeric>
#include <list>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <climits>
#include <set>
#include <memory.h>
#include <memory>
#include <cstdio>
#include <cstdlib>
#include <cctype>
#include <cassert>
#include <map>
#include <cassert>
#include <time.h>

using namespace std;

typedef complex<double> xy_t;
typedef pair<xy_t, xy_t> line;
typedef long long ll;
typedef pair<int, int> P;
typedef pair<int , P> PP;
typedef pair<int, string> Ps;
typedef vector<int> vec;
typedef vector<vec> mat;
const int INF= 1 << 30;
const double EPS = 1e-9;
const double PI = 3.1415926535897932384626433832795;

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

double cross(const xy_t &a, const xy_t &b){
	return imag(conj(a) * b);
}

double dot(const xy_t &a, const xy_t &b){
	return real(conj(a) * b);
}

xy_t projection(const line &l, const xy_t &p){
	double t = dot(p - l.first, l.first - l.second) / norm(l.first - l.second);
	return l.first + t * (l.first - l.second);
}

bool intersectSP(const line &l, const xy_t &p){
	return abs(l.first- p) + abs(l.second - p) - abs(l.first - l.second) < EPS;
}

double distanceSP(line s, xy_t p){
	const xy_t r = projection(s, p);
	if(intersectSP(s, r)) return abs(r - p);
	return min(abs(s.first - p), abs(s.second - p));
}

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

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

int main(){
  int n;
  cin>>n;
  double a[100]={};
  for(int i=0;i<n;i++)cin>>a[i];
  sort(a,a+n);
  
  int ans[6]={};
  double h=165;
  int i=0,cnt=0;
  while(i<n){
    if(a[i]>=h)h+=5,cnt=min(5,cnt+1);
    else ans[cnt]++,i++;
  }
  
  for(int i=0;i<6;i++){
    cout << i+1<<":";
    for(int j=0;j<ans[i];j++) cout << "*";
    cout <<endl;
  }
  
  return 0;
}

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

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

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++: #include<cstdio>
#include<iostream>
#include<algorithm>
#include<cstring>
#include<vector>
#define INF 999999
using namespace std;
int main(){
    int tall[15]={0},N;
    double t;
    cin>>N;
    while(N--){
        cin>>t;
        if(t<165)tall[1]++;
        if(165<=t&&t<170)tall[2]++;
        if(170<=t&&t<175)tall[3]++;
        if(175<=t&&t<180)tall[4]++;
        if(180<=t&&t<185)tall[5]++;
        if(185<=t)tall[6]++;
    }
    for(int i=1;i<7;i++){
        cout<<i<<":";
        while(tall[i]--){
            cout<<"*";
        }
        puts("");
    }
    return 0;
}

C++: #include <stdio.h>
#include <stack>
#include <math.h>
 
using namespace std;
 
 
int main(){
 
    int n,checkTable[6];
 
    double height;
    scanf("%d",&n);
 
    for(int i=0; i < 6; i++)checkTable[i] = 0;
 
    for(int i=0; i < n; i++){
        scanf("%lf",&height);
 
        if(height >= 185){
            checkTable[5]++;
        }else if(height >= 180){
            checkTable[4]++;
        }else if(height >= 175){
            checkTable[3]++;
        }else if(height >= 170){
            checkTable[2]++;
        }else if(height >= 165){
            checkTable[1]++;
        }else{
            checkTable[0]++;
        }
    }
 
    for(int i=0; i < 6; i++){
        printf("%d:",i+1);
        for(int k=0; k < checkTable[i]; k++){
            printf("*");
        }
        printf("\n");
    }
 
    return 0;
}

C++: #include <iostream>
#include <deque>
#include <string>
#include <cstdio>
#define loop(i,a,b) for(int i=a; i<int(b); i++)
#define rep(i,n) loop(i,0,n)

using namespace std;

int main(){
    int n;
    double h;
    int count[7] = {};
    cin >> n;
    int i, j;

    for (i = 0; i < n; i++){
        cin >> h;
        if (h < 165){
            count[1]++;
        }
        if (h < 170 && h >= 165){
            count[2]++;
        }
        if (h<175 && h >= 170){
            count[3]++;
        }
        if (h<180 && h >= 175){
            count[4]++;
        }
        if (h<185 && h >= 180){
            count[5]++;
        }
        if (h>=185){
            count[6]++;
        }
    }

    for (int i = 1; i <= 6; i++){
        cout << i << ":";
        for (int j = 0; j < count[i]; j++)putchar('*');
        puts("");
    }
}

    //    {
   
    //        for (i = 0; i < n; i++){
    //            if (hight[0] < 165)
    //                count++;
    //    }
    //        for (i = 0; i < count; i++){
    //            printf("1:%d", *);
    //        }

    //        for (j = 1; j <= 6; j++){
    //            for (i = 0; i < n; i++){
    //                if (hight[i] >= 165+i && hight[i]<175+i)
    //                    count++;
    //            }
    //            for (i = 2; i <= count; i++){
    //                printf("%d:%d", j, *);
    //            }
    //            i += 5;
    //        }
    //}