| # | Problem | Pass Rate (passed user / total user) |
|---|---|---|
| 1599 | Accumulated Error |
|
Description
For the safety concern, an elevator must have a limitation of the total weight it carries. Supposed there are N people wants to take the elevator in the same time, it is important to know whether their total weight is over-weighted. Unfortunately, measurement always comes with error. Now, we know the weight of every person, and the error of the weight, marked as W+-E, like 72.0+-1.5. Supposed the error is able to be accumulated, you are to determine the total weight of these N people, and the overall error of the sum of weight.
Input
There will be many test cases in a single file.
The first line of file contains one positive integer T, T≤10, indicating the number of test cases.
The following are T test cases. For each case, it will have 3 lines as the information. There is only one positive real number N, N≤100 in the first line, indicating the number of people. The next line contains N real number, indicating the weight Wi for each person. The third line also contains N integers, indicating the error Ei for each person. All Wi and Ei ≤ 200.
Output
For each test case, output a line with 2 real numbers which are the total weight and total error. You must output each real number with one digit after the decimal point, and separate them with a space.
If you use the