HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Unsorted > problem:


Word Statistics

Section problems

• Butterfly
• Word power
• Best Grass
• Cow PinBall
• Cow Sorting
• Maximum Sum
• Making Change
• Colored hills
• Word Statistics
• Binary transformations
• Bishops
• Sequence
• Polygons
• Galls village
• String manipulations
• Roads
• Points

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 100/100/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.

Problem Description

There are roughly 6,500 spoken languages in the world today. However, about 2,000 of those languages have fewer than 1,000 speakers. The most popular language in the world is Mandarin Chinese. There are 1,213,000,000 people in the world that speak that language.
Your task in this problem is to make a program to find out some syntax statistics of the languages that are written in English alphabet. The statistic is about the length of the words in the languages. Your program should read a text and display the length of the shortest and longest words, how many times the least and most frequently lengths occur, and the average word length in the text. 

Input

The input is a text file that contains, English letters, and four punctuation marks: ‘.’, ‘,’, ‘?’, and ‘!’. The words are separated with one or more spaces. There is no space between a word and the following  punctuation mark. The longest word in the text can contain at most 99 letters.

Output

The output file has five lines  displaying the shortest length, the longest length, the average length which is rounded to the nearest tens, the most frequently length and the least frequently length. In the case there are two or more least or most frequently lengths, display the shortest one.

Example

input output

Cpp is an object oriented programming language created by Bjarne Stroustrup and released in   nineteen eighty five.

It implements data abstraction using a concept called   classes, along with other features to allow object oriented programming

Shortest length is 1
Longest length is 11
Average length is 5.8
Most frequently length is 2
Least frequently length is 1

 

Äëÿ îòïðàâêè ðåøåíèé íåîáõîäèìî âûïîëíèòü âõîä.

www.contester.ru