#S0005. 给单词打分

给单词打分

1. Description

Create a word score calculator. Each letter's score follows the rule: a=1, b=2, ..., z=26. The user inputs multiple lowercase words (space-separated). Calculate each word's total score and output the highest-scoring word with its score. If multiple words share the highest score, choose the lexicographically smallest one.

2. Input & Output

Input:

  • A line of lowercase words separated by spaces

Output:

  • A single line formatted as word score

Example

# Input:  
hello world python  
# Output:  
python 98  
# Input:  
apple banana orange  
# Output:  
banana 48