[Hidden]
#### 1140. Cities

#### Description

There are n cities in Byteland, and the i_{th} city has a value a_{i}. The cost of building a bidirectional road between two cities is the sum of their values. Please calculate the minimum cost of connecting these cities, which means any two cities can reach each other.
#### Input

The first line is an integer T(T≤10^5), representing the number of test cases.

For each test case, the first line is an integer n(n≤10^5), representing the number of cities, the second line are n positive integers a_{i}(a_{i}≤10^5), representing their values.

#### Output

For each test case, output an integer ans, the minimum cost of connecting these cities.
#### Samples

#### Source

第九届山东省赛

For each test case, the first line is an integer n(n≤10^5), representing the number of cities, the second line are n positive integers a

Time Limit: | 1000MS (C/C++,Others×2) |

Memory Limit: | 128MB (C/C++,Others×2) |

Special Judge: | No |

AC/Submit: | 1 / 2 |

Tags: |