Chef and Stocks#11604

Chef and Stocks

1 second
128 megabytes
Easy

Chef has started learning about the stock market and has already selected a favourite stock.

He traded the stock for consecutive days. Let a_i denotes the profit earned by Chef on the -th day. Note that a_i < 0 indicates that Chef had a loss on the -th day.

Chef wants to find the maximum amount of profit he would have earned, if he skipped trading for exactly one day.

Input

The first line contains the number of test cases t~(1 \le t \le 1000). The first line of each test case contains n~(1 \le n \le 10^5) — the number of days. The next line denotes integers a_i~(-100 \le a_i \le 100), denoting the profit earned by Chef on the -th day.

Output

For each test case, print on a new line the maximum amount of profit he would have earned, if he skipped trading for exactly one day.

Examples

Example 1

Loading
Loading