**From New Scientist #2775, 28th August 2010** [link]

A game of badminton is won by the first player to win 21 points, except if the score reaches 20-20, in which case it continues until one player is two points ahead. A match is won by the first player to win two games.

In this match each player won one of the first two games, so that the match required a third game to determine the result. For each of the players, the number of points they won in the three games, taken in game order, formed an arithmetic progression (with a non-zero common difference).

What was the score in the deciding third game?

[enigma1610]

### Like this:

Like Loading...

The following code deals with the four possible cases for scoring the first two matches (with a maximum score less than 100). The code runs in 42ms.

Note that the only valid scores are generated by the first case.

Solution:The score in the third game is 21:15.