Strength Of String

0

0 votes
Problem

Every character for a to z are having weights 0 to 25. i.e a,b,c,.....z are having weights 0,1,2,3,....25.

Now stregth of a string is  the sum of weights of all characters present in the string.

You will given a string and you have to print a strength of string.

INPUT :

first line of input contains an integer T denoting number of test cases.

Next T lines contains a string

OUTPUT :

Print strength of string in new line for each test case.

CONSTRAINTS :

1<=T<=30

1<=|string|<=100000

Time Limit: 6
Memory Limit: 256
Source Limit:
Editor Image

?