ГлавнаяСборникиТурнирыРазделыФорумыУчастникиПечатьПомощьО системе

Разделы > Неотсортированные > задача:


Word Statistics

Задачи раздела

• Chessboard Pattern
• Binary transformations
• Bookshelf
• Coin Game
• Cow PinBall
• Cow Sorting
• Colored hills
• Word power
• Word Statistics
• Brackets
• Triangle
• Butterfly
• Galls village
• Sequence
• Bishops
• Polygons
• String manipulations

Обратная связь

Если у вас есть предложения или пожелания по работе Contester, посетите форум сайта www.contester.ru.

Лимит времени 100/100/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб.

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