Cryptarithmetic
easy
1. You are given three strings s1, s2 and s3. 2. First two are supposed to add and form third. s1 + s2 = s3 3. You have to map each individual character to a digit, so that the above equation holds true. Note -> Check out the question video and write the recursive code as it is intended without changing the signature. The judge can't force you but intends you to teach a concept.
Constraints
1 <= length of s1,s2,s3 <= 10
Format
Input
Three strings s1 s2 s3
Output
Check the sample output and question video
Example
Sample Input
team
pep
toppr
Sample Output
a-3 e-9 m-4 o-1 p-2 r-6 t-0
a-3 e-9 m-5 o-1 p-2 r-7 t-0
a-3 e-9 m-6 o-1 p-2 r-8 t-0
a-4 e-9 m-2 o-1 p-3 r-5 t-0
a-4 e-9 m-5 o-1 p-3 r-8 t-0
a-5 e-9 m-2 o-1 p-4 r-6 t-0
a-5 e-9 m-3 o-1 p-4 r-7 t-0
a-6 e-9 m-2 o-1 p-5 r-7 t-0
a-6 e-9 m-3 o-1 p-5 r-8 t-0
a-7 e-9 m-2 o-1 p-6 r-8 t-0
Question Video