All submissions for this problem are available.
In the fest of Paradigm, every organiser is given a special kind of pager. The pager consists of a screen and a single big red button. To type a message in it, one has to push the red button that many time at which the alphabet occurs in the alphabetical order. For example for typing D, one needs to push button 4 times.
To write a word one has to type the first word, wait for 2 seconds and then type the second word and so on.
You have to determine the value of the pushes required to type a word to send the message.
The first line will be number of strings n.
Subsequent n lines will consist of a string (say S) with no spaces in between.
Output will be a number determining the number of pushes required to type the string, S
- String size, len will be 1 ≤ len ≤ 50
- 1 ≤ n ≤ 50
- String will have no spaces, either in between, leading or trailing
- String will be in upper case ('A' - 'Z')
Input: 2 A AB Output: 1 3
Example case 1.
One needs to push once.
Example case 2.
1 push for A and 2 pushes for B, 1+2=3
|Time Limit:||1 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.6, PYPY, PAS fpc, NODEJS|
Fetching successful submissions