#K38782. Unique Identifier Generation

    ID: 26275 Type: Default 1000ms 256MiB

Unique Identifier Generation

Unique Identifier Generation

Given a list of user names consisting of only lowercase letters, generate a unique identifier for each name by appending the sum of the letter positions in the English alphabet. The value for each letter is defined by the formula: $$value(c) = \text{ord}(c) - \text{ord}('a') + 1$$, and the unique identifier for a name is the concatenation of the original name with the computed sum: $$\text{identifier} = \text{name} + \sum_{i=1}^{n}(\text{ord}(c_i) - \text{ord}('a') + 1).$$

For example, for the input alice, the sum is calculated as 1+12+9+3+5=30, resulting in the output alice30.

inputFormat

The first line contains a single integer n, the number of names. Each of the following n lines contains a non-empty string composed exclusively of lowercase English letters.

outputFormat

Output n lines, where each line contains the unique identifier corresponding to the given name.## sample

1
alice
alice30

</p>