#P9782. [HUSTFC 2023] A+B problem
[HUSTFC 2023] A+B problem
Problem Description
Walk Alone is a string master. In his eyes, every string represents a base number. Specifically, in alphabetical order, to correspond to to in decimal. Then corresponds to in decimal, corresponds to in decimal, and so on.
Walk Alone wants to test you, who are already used to decimal addition. He gives you two strings and . Please compute the sum of the base numbers they represent, that is, , and tell him the result in string form as well. For example, , and . To simplify the problem, and each contain only one uppercase letter, but note that the answer may contain more than one uppercase letter.
Input Format
One line contains two uppercase letters separated by a space, representing and .
Output Format
Output one line containing a string of uppercase letters, representing . The output must not contain leading , so outputs like and are invalid.
A A
A
B C
D
Z B
BA
Hint
Translated by ChatGPT 5