up
This commit is contained in:
parent
e6c3227145
commit
685b914f7d
10
Analyse_de_frequence.py
Normal file
10
Analyse_de_frequence.py
Normal file
@ -0,0 +1,10 @@
|
||||
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]))
|
Loading…
x
Reference in New Issue
Block a user