MD5 score
Time limit1sMemory limit512 MB
Concatenate S, #, and P, hash the result with MD5, and print the sum of the hex digits.
- Level
Easy1 of 10
- Topics
- Implementation
- Solved
- No attempts yet
Problem
You are given strings and .
Let be the concatenation of , the character #, and in that order.
Let be the MD5 hash of . is a hexadecimal string of length that uses the characters through and through .
The score of is the sum of its digits read as hexadecimal values.
If the hash were 20af3 (a real MD5 hash has length ; this shorter string is only to show the arithmetic), the score is .
Print the score of .
Input
The first line contains the string .
The second line contains the string .
and consist of uppercase letters, lowercase letters, and digits. Each has length from to .
Output
Print the score of on the first line.