621. Rohit and Virat's String Game
0
Medium
Rohit and Virat each have their own strings, str1 and str2 respectively. They want to determine the minimum sum of ASCII values of deleted characters in order to make the two strings equal.
Input Format
The first line contains the string str1. The second line contains the string str2.
Output Format
Display the minimum sum possible.
Example
Input
sea
eat
Output
231
Constraints
1 ≤ length of str1, str2 ≤ 1000
Loading...
View Submissions
Console