By Samuel Eduardo da Silva, IFSULDEMINAS/UFF Brazil
Since childhood, stories have fascinated us. Be it adventure, science fiction, romance ... regardless of gender, every story, if well told, provides us with knowledge, escape and lots of fun. Many stories are presented to us in book format, and this is one of the most valuable assets of our lives. Unfortunately, many people despise books because they are unaware of how important this medium is. Cate is a girl who loves reading, and the more books she consumes, the more she wants to consume. Over time, it has acquired many, and has almost a library at home. One day, he was looking for ways to get more out of his books, and he realized something interesting: if he took the first letter of each title, he could form interesting words. So he decided to take some books in a random way and, with the first letter of each title, to form words. After generating several words, he decided that he would create a new language, based on these words. The language name would be the set of initial letters of the words generated. As a very perfectionist, I would like to generate, for your new language, a report that contains: How many vowels and consonants exist in your language. She also likes exact (though not very good), and proposed a formula that dictates how long it would take a person to learn this new language. The formula is as follows: (total number of distinct letters + number of vowels) divided by the total number of consonants. The metric used for this value is hours. The result of this formula must also be present in the report. As Dão Brão's newest book, its favorite author, has been published, is very busy reading, but asked you to create a program, which given the random selections of books you made, indicate the words created and generate the report described above.
Note: It is recommended to use "scanf" instead of "getline" for some languages, such as C++, to read the book titles.
The first line contains an integer N, indicating the number of random selections you made. The next N lines describe the selections. Each selection starts with an integer M, indicating the number of books you have chosen for this selection. Each of the following M lines describes the title of a book, which is a string of characters, and may contain uppercase, lowercase letters and spaces.
Limits: 1 ≤ N ≤ 100; 1 ≤ M ≤ 20;
Each book name does not exceed 100 characters.
It should contain the report presented in the description of the problem. The order of the information can be seen in the test case. The name of the language should be presented in capital letters, and the words in lower case. The result of the formula must be presented with one decimal place. If the total consonants are null, instead of the total hours, the "Linguagem Ruim" message should be displayed at the end of the report.
Input Sample | Output Sample |
3 |
Nome da Linguagem: AOD |