0

GREEDY COUPLE

A party game has the fourteen party guests sitting in a circle on chairs numbered, in a clockwise direction, one to fourteen. A cup of beverage is passed from person to person around the circle in a clockwise direction, starting with the person sitting on chair number one. Every person has a drink from the cup before passing it on. Regardless of how many are sitting in the circle, after every 17th person has a drink he is then eliminated from the circle and does not drink again. The next person becomes number one and the process repeats itself. Thus the number of people in the circle reduces. People sit on the same chair for the entire game.

Sam and Sally are very fond of the beverage being served and want as much of it as possible. To do this they want to be the last two to be eliminated from the circle.

Write a program that tells us:

(1) the sequence, by chair numbers, of elimination from the circle,

4. the chair numbers that Sam and Sally should sit on to be the last pair left.

Your output should be in the form:

SEQUENCE OF ELIMINATION _,_,_,_,_,_,_,_,_,_,_,_,_,_.

THUS THE BEST SEATS FOR SAM AND SALLY ARE _,_.

2
Contributors
3
Replies
4
Views
9 Years
Discussion Span
Last Post by joshmo
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.