Contests | Virtual Contests | Problems | Submit | Runs Status | Rank List | Forum |

Time Limit: 2.0 Seconds Memory Limit: 65536K

Total Runs: 258 Accepted Runs: 134

Miss Kim and Mr. Han are playing a game called Nisoku, which is played as
follows. Initially, there is a pile of cards. Each card contains a real number
between 1.5 and 10.0, inclusive. You are given *N* doubles, the
*i*-th element of which is written on the *i*-th card.
Repeat the following step until there is only one card left in the pile:
Remove any two cards from the pile, and add one new card to the pile.
Write either *a*+*b* or *a***b* on the new card, where
*a* and *b* are the numbers written on the two cards that were
removed.

The first line will contain the number of test cases. Each case has two lines
of input. The first line will contain a integer *N*(2 ≤ *N* ≤
50) indicating the number of cards. The second line will contain *N*
doubles corresponding to the real number written on the *i*-th card,
separated by spaces.

For each case output the maximal possible number written on the final card in a line. Round the number in the output to 6 digits after decimal point.

4 2 5 8 2 1.5 1.8 3 8.26 7.54 3.2567 4 1.5 1.7 1.6 1.5

40.000000 3.300000 202.828579 9.920000

Maintance:Fxz. Developer: SuperHacker, G.D.Retop, Fxz