#C11377. Word Coolness Calculation

    ID: 40686 Type: Default 1000ms 256MiB

Word Coolness Calculation

Word Coolness Calculation

In this problem, you are required to calculate a unique value called the coolness of a word. The coolness of a word is defined as the product of the number of unique letters in the word and the length of the word. Each letter is considered case-insensitively. For example, for the word \(Hello\), there are 4 unique letters and its length is 5, so its coolness is \(4 \times 5 = 20\).

You will be given multiple words. For each word, compute its coolness and output the result on a separate line.

Note: All input and output operations should be performed using standard input (stdin) and standard output (stdout).

inputFormat

The first line contains an integer \(T\) representing the number of test cases (words). Each of the following \(T\) lines contains a single word.

For example:

3
Hello
World
Programming

outputFormat

For each word, output its coolness value on a separate line. The coolness of a word is defined as:

[ \text{coolness} = (\text{number of unique letters}) \times (\text{length of the word}) ]

For the sample input above, the output should be:

20
25
88
## sample
3
Hello
World
Programming
20

25 88

</p>