Problem Statement | |||||||||||||
You are given a String[] numbers, each element of which represents a positive integer written using the letters 'A' through 'J' instead of digits. You know that each letter represents exactly one digit, and each digit is represented by exactly one letter. You also know that none of the integers start with zero. Return the maximum possible sum of the given integers. | |||||||||||||
Definition | |||||||||||||
| |||||||||||||
Constraints | |||||||||||||
- | numbers will contain between 1 and 50 elements, inclusive. | ||||||||||||
- | Each element of numbers will contain between 1 and 12 characters, inclusive. | ||||||||||||
- | Each element of numbers will contain only uppercase letters between 'A' and 'J', inclusive. | ||||||||||||
- | There will be at least one letter between 'A' and 'J', inclusive, that never occurs as the first character of any element of numbers. | ||||||||||||
Examples | |||||||||||||
0) | |||||||||||||
| |||||||||||||
1) | |||||||||||||
| |||||||||||||
2) | |||||||||||||
| |||||||||||||
3) | |||||||||||||
| |||||||||||||
4) | |||||||||||||
|