Picking a Committee Without Repeats
Bramley Books runs a raffle with ten entries, numbered from 0 to 9. Three of them win, and the prizes differ, so the order of the draw matters: the first number drawn wins the hamper, the second the voucher, the third the tote bag. Nobody may win twice — once an entry has been drawn it is out of the barrel. The shop has to be able to show the draw was not fixed, so it is run from a seed announced beforehand: NumPy's classic global random stream is set from that seed, and the three winners come from one pick that cannot repeat an entry.
Task: Print the three winning entry numbers.
Input
One line holding a single integer, the seed.
Output
One line holding the three winning entry numbers in the order drawn, separated by single spaces, each a plain integer between 0 and 9. No number appears twice.
Example:
Input:
1
Output:
2 9 6
Sign in to solve this problem
Reading problems is free for everyone — solving them (Run, Submit, and tracking what you've solved) needs an account.
Sign in