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
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <fstream>
#include <complex>
#include <math.h>

using namespace std;

//conversion
//------------------------------------------
inline long toLong(string s) {long v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

//math
//-------------------------------------------
template<class T> inline T sqr(T x) {return x*x;}

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef pair<long, long> PLL;
typedef long long LL;
//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())

//repetition
//------------------------------------------
#define FOR(i,a,b) for(long i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

//constant
//--------------------------------------------

//clear memory
#define CLR(a) memset((a), 0 ,sizeof(a))

const long double EPS = 1e-12;
const double INF = 1e9;

struct edge{int to,cost;};
typedef pair<int,int> P;//firstは最短距離,secondは頂点番号


int main(){
	double rnk[]={165.0,170.0,175.0,180.0,185.0,INF};
	int n;
	cin>>n;
	string cnt[6];
	REP(i,6)cnt[i]="";
	REP(i,n){
		double t;
		cin>>t;
		REP(i,6){
			if(t<rnk[i]){
				cnt[i]+='*';
				break;
			}
		}
	}
	REP(i,6)cout<<i+1<<":"<<cnt[i]<<endl;
	return 0;
}

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

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

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

const double s[5] = { 165.0, 170.0, 175.0, 180.0, 185.0 };

int main( void )
{
	int n;
	cin >> n;

	vector <int> list(6,0);
	for ( int i = 0; i < n; i++ )
	{
		double h;
		cin >> h;

		int j;
		for ( j = 0; j < 5; j++ )
		{
			if ( h < s[j] )
				break;
		}

		list[j]++;
	}

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

	return 0;
}

C++: #include<iostream>
#include<string>
using namespace std;
int main(){
	int n,a,b[6]={0};
	cin>>n;
	for(int i=0;i<n;i++){
		cin>>a;
		if(a<165)
			b[0]++;
		if(a>=165&&a<170)
			b[1]++;
		if(a>=170&&a<175)
			b[2]++;
		if(a>=175&&a<180)
			b[3]++;
		if(a>=180&&a<185)
			b[4]++;
		if(a>=185)
			b[5]++;
	}
	for(int i=0;i<6;i++){
		cout<<i+1<<":";
		for(int j=0;j<b[i];j++)
			cout<<"*";
		cout<<endl;
	}
    return 0;
}

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

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


int main(){

	int n;
	vector<double> v(100,0);	
	vector<int> h(7,0);
	cin >> n;
	rep(i,n)
	{	
		cin >> v[i];
		if(v[i] <165.0)
			h[0]++;
		else if(v[i]<170.0)
			h[1]++;
		else if(v[i] < 175.0)
			h[2]++;
		else if(v[i] < 180.0)
			h[3]++;
		else if(v[i] < 185.0)
			h[4]++;
		else 
			h[5]++;
	}
	rep(j,6)
		rep(k,h[j]+1)
			{
			 if(k == 0)cout << j+1 << ":";
			 if(h[j] != 0&& k != 0)cout << "*";
			 if(k == h[j])
				cout << endl;
			}




}

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

void res(int);
int judge(double);

int main(void){
  int n,cnt[6]={0};
  double height;

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

  for( int i = 0 ; i < 6 ; i++ ){
    cout << i+1 << ':';
    res(cnt[i]);
  }

  return 0;
}

void res(int cnt){
  while(cnt > 0 ){
    cout << '*';
    cnt--;
  } 
  cout << endl;
}

int judge(double h){

  if( h < 165.0 ) return 1;
  else if( h < 170.0 ) return 2;
  else if( h < 175.0 ) return 3;
  else if( h < 180.0 ) return 4;
  else if( h < 185.0 ) return 5;
  return 6;

}

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

C++: #include <iostream>
using namespace std;
int main(void){
    int n,a[6]={0};
    cin>>n;
    for(int i=0; i<n; i++){
        double h;
        cin>>h;
        if(h<165)
        a[0] ++;
        if(165<=h&&h<170)
        a[1] ++;
        if(170<=h&&h<175)
        a[2] ++;
        if(175<=h&&h<180)
        a[3] ++;
        if(180<=h&&h<185)
        a[4] ++;
        if(h>=185)
        a[5] ++;
    }
    for(int i=0; i<6; i++){
        cout<<i+1<<":";
        for(int j=0; j<a[i]; j++){
            cout<<"*";
        }
        cout<<endl;
    }
}

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

int main() {
  int n;
  float h[40];
  int num[6] = {0, 0, 0, 0, 0, 0};

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

  for(int i = 0; i < n; i++) {
    if(h[i] < 165.0)
      num[0]++;
    else if(h[i] < 170.0)
      num[1]++;
    else if(h[i] < 175.0)
      num[2]++;
    else if(h[i] < 180.0)
      num[3]++;
    else if(h[i] < 185.0)
      num[4]++;
    else
      num[5]++;
  }

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

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

map<int, int> create_map() {
    map<int, int> m;
    for (int i = 1; i <= 6; i++) m.insert({i, 0});
    return m;
}



int main()  {
    double a;
    bool flag;
    map<int, int> m = create_map();
    int n, idx;
    scanf("%d", &n);
    for (int i = 0; i < n; i++) {
        scanf("%lf", &a);
        idx = 6; flag = false;
        for (double i = 185; i >= 165; i-=5) {
            if (a >= i) { m[idx]++; flag = true; break; }
            idx--;
        }
        if (!flag) m[1]++;
    }
    for (int i = 1; i <= 6; i++) {
        printf("%d:", i);
        for (int j = 0; j < m[i]; j++) printf("*");
        printf("\n");
    }


    return 0;
}