String Addition

5

5 votes
Ad-Hoc, Simulation, Easy
Problem

You will be given N strings. You need to add them. String contains {[a-z][A-Z][0-9]}.
Order of value of each character is 0 < 1 < 2 < ... < 9 < a < b < ... < z.
Also, a=A, b=B, c=C, ... , z=Z.

Input Format:
First line gives T, number of test cases.
Each test case has a number N in first line.
Next N lines has a string each.

Output Format:
For each test case, print a resultant sum of strings in new line. Print exact number of characters as in the value of sum. No leading zeros should be printed. Output string should only have characters from set {[a-z][0-9]}.

Constraints:
1 ≤ T ≤ 500
1 ≤ N ≤ 100
1 ≤ |S| ≤ 100
Si ∈ {[a-z][A-Z][0-9]}

Time Limit: 2
Memory Limit: 256
Source Limit:
Editor Image

?