Betting tax

   If you must play, decide upon three things at the start: the rules of
  the game, the stakes, and the quitting time. — Chinese Proverb

There is a wide range of betting games available for devoted gamblers.
Bookmakers make a living of taking bets on sports and other events at
agreed upon odds, always keeping for themselves a fixed percentage of
the collected money. Note that they are experienced enough to foresee
the amounts of money that will be bet on every result before any actual
bet is made, so that odds can be adjusted properly beforehand.

The game procedure is simple: You bet 1$ on the result of some event,
the winner of a football match, for example. If eventually you made the
right guess, you receive a certain amount of money depending on the
result you bet for. If your guess was wrong, you receive nothing back.

In this problem, you are given the number of possible results n, and the
money that you would receive for each of the results. Since you are a
smart guy, before making your bet you want to know which is the
percentage kept by the bookmaker.

Input

Input consists of several cases. Every case begins with the number
n ≥ 2, followed by the money paid for each result (at least one dollar).
A case with n = 0 ends the input.

Output

For every case, print which is the percentage kept by the bookmaker with
two digits after the decimal point. The input cases have no precision
issues. If the bookmaker loses money, print “Stupid!”.

Problem information

Author: Daniel Rodrigo

Generation: 2026-01-25T11:26:07.773Z

© Jutge.org, 2006–2026.
https://jutge.org
