1570 string repair
Submit solution
Points:
100
Time limit:
1.0s
Memory limit:
32M
Problem types
Allowed languages
C, C++, Java, Python
Description
You have two strings, s and t, and you want them to be equal. You can change individual letters in the strings, but you cannot add or remove letters. In a single move, you can change any one letter in one string to the letter that comes directly before or after it in the alphabet. The alphabet wraps around, so you can also change 'a' to 'z' or 'z' to 'a'. You want to make the two strings equal using the minimum possible number of moves. find the resulting string. If there are multiple answers, find the one that comes earliest alphabetically.
Input
Multi case Every case contain two strings(same length) , one per line. Process to the end of the file
Output
One string said above.
Sample
Input
cat
dog
Output
caa
Source: zjut_DD
Comments