Current location - Training Enrollment Network - Mathematics courses - Mathematical pearl string
Mathematical pearl string
Item code 13 pearls are 1, 2,3, ..., 13.

Step 1: 1, 2, 3, 4-5, 6, 7, 8;

If equal, different pearls are in 9-13;

{Step 2: 1, 9- 10,11;

If they are equal, the difference is 12 or13;

{Step 3:1-12;

If equal, the difference is 13 (but it is impossible to determine whether the bad ball is too heavy or too light);

If not, the difference is12;

}

If you leave >; To the right, 9 may be too heavy, or one of 10, 1 1 may be too light;

{Step 3: 10- 1 1.

If they are equal, then 9 is different and too heavy;

If you leave >; Yes, then 1 1 is different, too light;

If you leave,

}

If you leave,

{Step 3: 10- 1 1.

If they are equal, then 9 is different and too light;

If you leave >; Yes, then 10 is different, too heavy;

If you leave,

}

}

If you leave >; Right ("left"

{Step 2: 1, 2, 9-3, 4, 5;

If they are equal, the difference is 6, 7 and 8, and the difference is too light;

{Step 3: 6-7;

If equal, 8 is different and too light; Complete;

If you leave >; Yes, then 7 is different, too light; Complete;

If you leave,

}

If you leave >; Yes, then one of 1 2 is too heavy, or 5 is too light;

{Step 3:1-2;

If they are equal, then 5 is different and too light; Complete;

If you leave >; Yes, then 1 is different, too heavy; Complete;

If you leave,

}

If you leave,

{Step 3: 3-4;

If they are equal, then 5 is different and too light; Complete;

If you leave >; Yes, that 3 is different and too heavy; Complete;

If you leave,