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()
	}
}

Python: n=int(input())
b=[0,0,0,0,0,0]
for i in range(n):
    s=float(input())
    if s<165:
        b[0]+=1
    elif 165<=s<170:
        b[1]+=1
    elif 170<=s<175:
        b[2]+=1
    elif 175<=s<180:
        b[3]+=1
    elif 180<=s<185:
        b[4]+=1
    else:
        b[5]+=1
a=[print(str(i+1)+":"+"*"*b[i]) for i in range(len(b))]

Python: n = int(input())
s_1 = ''
s_2 = ''
s_3 = ''
s_4 = ''
s_5 = ''
s_6 = ''
for i in range(n):
    h = float(input())
    if h < 165.0:
        s_1 += '*'
    elif h < 170.0:
        s_2 += '*'
    elif h < 175.0:
        s_3 += '*'
    elif h < 180.0:
        s_4 += '*'
    elif h < 185.0:
        s_5 += '*'
    else:
        s_6 += '*'
print('1:'+s_1)
print('2:'+s_2)
print('3:'+s_3)
print('4:'+s_4)
print('5:'+s_5)
print('6:'+s_6)

Python: a={0:0,1:0,2:0,3:0,4:0,5:0}
for _ in range(int(input())):
    b=int(float(input()))
    if b<165:b=160
    elif b>185:b=185
    a[b//5-32]+=1
for i in a:print('%d:'%(i+1)+'*'*a[i])

Python: n=int(input())
x=[0 for i in range(6)]
for i in range(n):
  a=float(input())
  if a<165.0:
    x[0]+=1
  elif 165.0<=a<170.0:
    x[1]+=1
  elif 170.0<=a<175.0:
    x[2]+=1
  elif 175.0<=a<180.0:
    x[3]+=1
  elif 180.0<=a<185.0:
    x[4]+=1
  else:
    x[5]+=1
for i in range(6):
  print('{}:{}'.format(i+1,x[i]*'*'))

Python: HEIGHT_BASE = [165, 170, 175, 180, 185, 1000]

distribution = [0, 0, 0, 0, 0, 0]

input_data = [float(input()) for lp in range(int(input()))]

for item in input_data:
    for index, base in enumerate(HEIGHT_BASE):
        if item < base:
            distribution[index] += 1
            break

for index in range(6):
    print(str(index + 1) + ":" + "*" * distribution[index])

Python: num_list = [0 for l in range(6)] #人数をカウントするためのリスト作成

#身長に合わせてリストの数をカウンタ変数にしカウントする
for _ in range(int(input())):
    num = float(input())
    if num < 165:num_list[0] += 1
    elif num < 170:num_list[1] += 1
    elif num < 175:num_list[2] += 1
    elif num < 180:num_list[3] += 1
    elif num < 185:num_list[4] += 1
    else:num_list[5] += 1
    
#出力
for j in range(1,7):
    print(str(j) + ":",end="")
    for k in range(num_list[j - 1]):
        print("*",end="")
    print()

Python: # -*- coding: utf-8 -*-

import sys
import os
import math

N = int(input())

A = [0] * 6

for i in range(N):
    h = float(input())

    if h < 165.0:
        A[0] += 1
    elif h < 170.0:
        A[1] += 1
    elif h < 175.0:
        A[2] += 1
    elif h < 180.0:
        A[3] += 1
    elif h < 185.0:
        A[4] += 1
    else:
        A[5] += 1

for i, a in enumerate(A):
    s = "{}:{}".format(i+1, '*' * a)
    print(s)

Python: n = int(input())
h = []
for i in range(n):
    h.append(float(input()))
temp = [165., 170., 175., 180., 185., 190.]
h.sort()
t = 0
ans = [0 for i in range(6)]
for i in h:
    while i >= temp[t]:
        t += 1
    ans[t] += 1
for i in range(6):
    print(str(i+1) + ':' + '*' * ans[i])

Python: from collections import Counter

cnt = Counter()
n = int(input())
for _ in range(n):
  h = float(input())
  if h < 165:
    cnt[1] += 1
  elif h < 170:
    cnt[2] += 1
  elif h < 175:
    cnt[3] += 1
  elif h < 180:
    cnt[4] += 1
  elif h < 185:
    cnt[5] += 1
  else:
    cnt[6] += 1

for k in (1, 2, 3, 4, 5, 6):
  print(k, "*" * cnt[k], sep=":")

Python: # Aizu Problem 00136: Frequency Distribution of Height
#
import sys, math, os, copy

# read input:
PYDEV = os.environ.get('PYDEV')
if PYDEV=="True":
    sys.stdin = open("sample-input2.txt", "rt")


limits = {1: [0, 165], 2: [165, 170], 3: [170, 175], 4: [175, 180],
          5: [180, 185], 6: [185, 9999999]}

dist = {k: 0 for k in range(1, 7)}
N = int(input())
for _ in range(N):
    h = float(input())
    for k in range(1, 7):
        if h < limits[k][1]:
            dist[k] += 1
            break
for k in range(1, 7):
    print("%d:%s" % (k, '*' * dist[k]))

Python: import heapq
from collections import deque
from enum import Enum
import sys
import math
from _heapq import heappush, heappop
import copy
from test.support import _MemoryWatchdog

BIG_NUM = 2000000000
HUGE_NUM = 99999999999999999
MOD = 1000000007
EPS = 0.000000001
sys.setrecursionlimit(100000)


SIZE = 6
table = [0]*SIZE
N = int(input())

for _ in range(N):
    tmp = float(input())

    if tmp < 165.0:
        table[0] += 1
    elif tmp < 170.0:
        table[1] += 1
    elif tmp < 175.0:
        table[2] += 1
    elif tmp < 180.0:
        table[3] += 1
    elif tmp < 185.0:
        table[4] += 1
    else:
        table[5] += 1

for i in range(1,7):
    print("%d:"%(i),end="")
    for k in range(table[i-1]):
        print("*",end="")
    print()

Python: n = int(input())
data = {k: 0 for k in range(1, 7)}
for _ in range(n):
    tmp = float(input())
    if tmp < 165.0:
        data[1] += 1
    elif 165.0 <= tmp < 170.0:
        data[2] += 1
    elif 170.0 <= tmp < 175.0:
        data[3] += 1
    elif 175.0 <= tmp < 180.0:
        data[4] += 1
    elif 180.0 <= tmp < 185.0:
        data[5] += 1
    else:
        data[6] += 1

for k, v in data.items():
    print("{}:{}".format(k, v*"*"))

Python: # AOJ 0136: Frequency Distribution of Height
# Python3 2018.6.18 bal4u

freq = [0]*6

for i in range(int(input())):
	k = float(input())
	if   k < 165: freq[0] += 1
	elif k < 170: freq[1] += 1
	elif k < 175: freq[2] += 1
	elif k < 180: freq[3] += 1
	elif k < 185: freq[4] += 1
	else:         freq[5] += 1

for i in range(6):
	print(i+1, ':', '*'*freq[i], sep='')

Python: L = [0] * 7

num = int(input())

for _ in range(num):
    h = float(input())
    if h < 165:
        L[1] += 1
    elif h < 170:
        L[2] += 1
    elif h < 175:
        L[3] += 1
    elif h < 180:
        L[4] += 1
    elif h < 185:
        L[5] += 1
    else:
        L[6] += 1

for i in range(1,7):
    print("{}:{}".format(i, "*" * L[i]))

Python: n=int(input())
l=[0]*6
for i in range(n):
    k=float(input())
    if k<165:l[0]=l[0]+1
    else:
        l[int((k-160)//5)]=l[int((k-160)//5)]+1
for i in range(6):
    m=f"{i+1}:"
    for j in range(l[i]):
        m+="*"
    print(m)

C++: #include <iostream>
using namespace std;
int main(){
  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 <cstdio>
#include <vector>
using namespace std;

int main()
{
  int n;
  while (~scanf("%d", &n)) {
    vector<int> g(6, 0);
    for (int i = 0; i < n; ++i) {
      double h;
      scanf("%lf", &h);
      if (h < 165.0)
	++g[0];
      else if (h < 170.0)
	++g[1];
      else if (h < 175.0)
	++g[2];
      else if (h < 180.0)
	++g[3];
      else if (h < 185.0)
	++g[4];
      else
	++g[5];
    }

    for (int i = 0; i < 6; ++i) {
      printf("%d:", i);
      for (int j = 0; j < g[i]; ++j)
	printf("*");
      puts("");
    }
  }
  return 0;
}