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<stdio.h>
int main(void)
{
	int n,i;
	float s[40];
	int nz1=0,nz2=0,nz3=0,nz4=0,nz5=0,nz6=0;
	while(scanf("%d",&n)!=EOF){
		for(i=0;i<n;i++){
			scanf("%f",&s[i]);
			if(s[i]<165.0){
				nz1+=1;
			}
			else if(s[i]>=165.0 && s[i]<170.0){
				nz2+=1;
			}
			else if(s[i]>=170.0 && s[i]<175.0){
				nz3+=1;
			}
			else if(s[i]>=175.0 && s[i]<180.0){
				nz4+=1;
			}
			else if(s[i]>=180.0 && s[i]<185.0){
				nz5+=1;
			}
			else if(s[i]>=185.0){
				nz6+=1;
			}
		}
		printf("1:");
		for(i=0;i<nz1;i++){
			printf("*");
		}
		printf("\n");
		printf("2:");
		for(i=0;i<nz2;i++){
			printf("*");
		}
		printf("\n");
		printf("3:");
		for(i=0;i<nz3;i++){
			printf("*");
		}
		printf("\n");
		printf("4:");
		for(i=0;i<nz4;i++){
			printf("*");
		}
		printf("\n");
		printf("5:");
		for(i=0;i<nz5;i++){
			printf("*");
		}
		printf("\n");
		printf("6:");
		for(i=0;i<nz6;i++){
			printf("*");
		}
		printf("\n");
	}
	return 0;
}

C++: #include<iostream>

using namespace std;

int main(){
	int n,bunri[6]={0};
	char hoshi='*';
	double length,hantei[5];
	
	for(int i=0;i<5;i++){
		hantei[i]=165+i*5;
	}
	
	cin>>n;
	for(int i=0;i<n;i++){
		
		cin>>length;
		if(length<hantei[0]){
			bunri[0]++;
		}
		else if(length>hantei[4]){
			bunri[5]++;
		}
		else{
			for(int j=1;j<5;j++){
				if((hantei[j-1])<=length && length<hantei[j]){
					bunri[j]++;
					break;
				}
			}
		}
	}
	
	for(int i=0;i<6;i++){
		cout<<1+i<<":";
		for(int j=0;j<bunri[i];j++){
			cout<<hoshi;
		}
		cout<<endl;
	}
}

C++: #include<stdio.h>
int main(void)
{
	int n,i,x,p,j;
	int sin[6];
	float a[41];
	x=0;
	p=0;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%f",&a[i]);
	}
	for(i=1;i<=6;i++){
		sin[i]=0;
	}
	for(i=1;i<=n;i++){
		if(165>a[i]){
			sin[1]++;
		}
		else if(165<=a[i] && a[i]<170){
			sin[2]++;
		}
		else if(170<=a[i] && a[i]<175){
			sin[3]++;
		}
		else if(175<=a[i] && a[i]<180){
			sin[4]++;	
		}
		else if(180<=a[i] && a[i]<185){
			sin[5]++;
		}
		else if(185<=a[i]){
			sin[6]++;
		}
	}
	for(i=1;i<=6;i++){
		x++;
		p=sin[i];
		printf("%d:",x);
		if(p!=0){
			for(j=0;j<p;j++){
				printf("*");
			}
		}
		printf("\n");
	}
	return 0;
}

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

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




	return 0;
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <numeric>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <utility>
#include <sstream>
#include <complex>

using namespace std;

#define FOR(i,a,b) for(long long i=(a);i<(b);i++)
#define REP(i,N) for(long long i=0;i<(N);i++)
#define ALL(s) (s).begin(),(s).end()
#define fi first
#define se second

#define PI acos(-1.0)
#define INF 1000000007

typedef long long ll;
typedef pair<ll, ll> P;
typedef pair<double, double> PD;
typedef pair<string, ll> PS;
typedef vector<ll> V;

double a;
int n;
string ans[6] = { "", "", "", "", "", "" };

int main(){
	cin >> n;
	REP(i, n){
		cin >> a;
		for (int j = 0; j < 6; j++){
			if (a < 165 + 5 * j){
				ans[j] += "*";
				break;
			}
		}
	}
	REP(j, 6)cout << j << ':' << ans[j] << endl;
}

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

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

	return 0;
}

C++: #include<bits/stdc++.h>
#define rep(i,n)for(int i=0;i<n;i++)
using namespace std;

int cnt[6];
int main() {
	int n; cin >> n;
	rep(i, n) {
		double d; cin >> d;
		if (d >= 185.)cnt[5]++;
		else if (d >= 180.0)cnt[4]++;
		else if (d >= 175.)cnt[3]++;
		else if (d >= 170.)cnt[2]++;
		else if (d >= 165.)cnt[1]++;
		else cnt[0]++;
	}
	rep(i, 6) {
		cout << i + 1 << ':';
		rep(j, cnt[i])cout << '*';
		cout << endl;
	}
}

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

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

int main(){
  int n,b[6]={};
  cin >> n;
  for(int i = 0; i < n; i++){
    double h;
    cin >> h;
    if( h < 165 ) b[0]++;
    if( 165 <= h && h < 170 ) b[1]++;
    if( 170 <= h && h < 175 ) b[2]++;
    if( 175 <= h && h < 180 ) b[3]++;
    if( 180 <= h && h < 185 ) b[4]++;
    if( h >= 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<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<vector>
#include<cmath>
#include<cstring>
#include<cstdio>
#include<time.h>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define pb push_back
#define mp make_pair
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
const double EPS=1e-10;
using namespace std;
typedef long long ll;
typedef vector<int> vi;
int main(){
	double h[6]={165.0,170.0,175.0,180.0,185.0,1e9};
	int n;
	cin>>n;
	vector<int>out(6);
	while(n--){
		double a;
		cin>>a;
		rep(i,6)if(a<h[i]){out[i]++;break;}
	}
	rep(i,6){
		cout<<i<<":";
		rep(j,out[i])cout<<"*";
		cout<<endl;
	}	
}

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?(160+5*j):0)<=data&&data<((j==dist.size()-1)?data+1:(165+5*j)))
        dist[j]++;
    }
  }

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