High-Precision Number
A number with 30 decimal digits of precision can be represented by a structure type as shown in the examples below. It includes a 30-element integer array (digits), a single integer (decpt) to represent the position of the decimal point and an integer (or character) to represent the sign (+/-). For example, the value -218.302869584 might be stored as
The value 0.0000123456789 might be represented as follows.
Your task is to write a program to calculate the sum of high-precision numbers.
Input
The first line contains a positive integer n (1 ≤ n ≤ 100) indicating the number of groups of high-precision numbers (maximum 30 significant digits). Each group includes high-precision numbers (one number in a line) and a line with only 0 indicating the end of each group. A group can contain 100 numbers at most.
Output
For each group, print out the sum of high-precision numbers (one value in a line). All zeros after the decimal point located behind the last non-zero digit must be discarded.