scores; a score can be negative. A coach picks one non-empty team from any of the participants. The strength of a team is the **product** of its members' scores.
Return the largest strength a team can have.scores=[2, -3, 0, -4, -1] → 24
Pick 2, −3 and −4: 2 · (−3) · (−4) = 24. Adding −1 would make the product negative, and 0 would wipe it out.
scores=[-7, 0] → 0
A one-person team with score 0 gives 0, which beats −7.
scores=[-5] → -5
The team must not be empty, so the only option gives −5.
scores=[2, -3, 0, -4, -1]
24
Run checks the first 3 tests in your browser. Submit checks all 115 tests on the server, hidden ones included.