-->
当前位置:首页 > 题库

PROGRAMMING:Sum of combinatorial numbers

Luz5年前 (2021-05-10)题库352
Given n non-zero digits, any two of them can be combined into a two digit number. All possible combinations of 2-digit sums are required. For example, given 2, 5 and 8, you can combine them into 25, 28, 52, 58, 82 and 85, and their sum is 330.
###Input format:
Input gives n (1 $$< $$n $$< $$10) in a row, followed by n different non-zero digits. Numbers are separated by spaces.
###Output format:
Output the sum of all possible 2-digit combinations.
###Input example:
```in
3 2 8 5
```
###Output example:
```out
three hundred and thirty
```







answer:If there is no answer, please comment