#C9636. Alphabetical Sum of Words

    ID: 53751 Type: Default 1000ms 256MiB

Alphabetical Sum of Words

Alphabetical Sum of Words

Given an input string containing words separated by spaces, convert each word into the sum of the alphabetical positions of its letters. The mapping is defined as (a=1, b=2, \ldots, z=26) (the mapping is case-insensitive). Ignore any non-alphabetical characters. Print the resulting sums as a space-separated sequence of numbers. This problem tests string manipulation and basic arithmetic computations.

inputFormat

A single line containing the input string. The string may include uppercase and lowercase letters and spaces. It may also be empty.

outputFormat

A single line containing the space-separated sums corresponding to the alphabetical values of the letters in each word.## sample

hello world
52 72

</p>