Submit solution
Points:
3 (partial)
Time limit:
2.0s
Memory limit:
128M
Author:
Problem type
Allowed languages
Python
is getting bullied for using Python 3. Help cheer him up by creating a program that tells him the alphabet score of a word.
A word's alphabet score is the occurrence of each letter times the place that letter is in the alphabet. For example, the string ab
gives a
, and it is the first letter in the alphabet. So a
's alphabet score b
, and because b
is the second letter in the alphabet, b
's alphabet score is
Also, you must code it in Python 3.
Input Specification
You will receive one line of input containing a non-empty string
Output Specification
Output the alphabet score of the string.
Constraints
Subtask 1 [60%]
Subtask 2 [40%]
No additional constraints.
Sample Input 1
Copy
python
Sample Output 1
Copy
98
Sample Input 2
Copy
qwertytown
Sample Output 2
Copy
180
Comments
my code works on my idle but here they give a WA
Don't prompt for input.
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
why is there a memory error