Drug problems verified in 1000 Mice

Source: Internet
Author: User
There are 1000 bottles of medicine, but one of them is toxic. After a week, the mouse will die!
How many mice are needed to find toxic drugs in a week?

Answers include 9, 10, 32, and 999.

For example, if you have 8 bottles of medicine, you can get 3 rats...

Initial status of mouse:
000 (active)

8 bottles of medicine Number:
000 001 010 011 100 101 110 111

Feed eight bottles of medicine to a mouse in sequence:
No one will feed the first bottle
Second bottle 001 feed first
Third bottle 010 feed second
The fourth bottle is 011. Feed the first and second bottles.
...

If the N bottle is toxic, the white mouse's status will change to 000 & ABC

Use binary instead of decimal representation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.