#P9782. Walk Alone's Base-26 Addition
Walk Alone's Base-26 Addition
Walk Alone's Base-26 Addition
Walk Alone is a master of strings. In his eyes, every string represents a number in base-26. Specifically, the uppercase letters from A to Z correspond to the digits 0 to 25, respectively. For example, the string BA
represents the number $$1\times26+0=26$$ in decimal, and BB
represents $$1\times26+1=27$$.
You are given two strings s
and t
, each consisting of exactly one uppercase letter. Your task is to compute the sum of their corresponding base-26 values and output the result as a string in the same format. Note that although each input string is a single letter, the result may consist of more than one letter.
For example:
A + A = A
because $$0+0=0$$.B + C = D
because $$1+2=3$$.Z + Z = BY
because $$25+25=50$$ and $$50=1\times26+24$$, corresponding toB
andY
respectively.
inputFormat
The input consists of two lines. The first line contains the string s
and the second line contains the string t
, each being a single uppercase letter.
outputFormat
Output a single string representing the sum of the corresponding base-26 numbers of s
and t
.
sample
A
A
A