You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

10 lines
383 B

nbLignes, nbMots = map(int, input().split(" "))
histogramme = [0] * 101
for loop in range(nbLignes):
mots = input().split(" ")
for idMot in range(nbMots):
longueur = len(mots[idMot])
histogramme[longueur] = histogramme[longueur] + 1
for longueur in range(101):
if histogramme[longueur] > 0:
print("{} : {}".format(longueur, histogramme[longueur]))