Switch of 100 light bulbs

Source: Internet
Author: User

Problem:

There are 100 bulbs, the first round of all the lights, the second round of each two lights out one, that is, 2nd, 4th, and so on, in the third round, change the number to a multiple of 3: electric lights, 3rd, 6th. If the light is on, turn it off. If it is off, light it, wait until 100th rounds. Q: How many bulbs are bright after the end of 100th?

Answer:

If the last light is on, it must have been switched to an odd number of times (0th times are all switched off ).

First, let's take a look at the six lights. The number of switches is 1st (wheel), 2nd, 3rd, and 6th.

It can be seen that if a round of 6 is switched, the round number must be an integer of 6, that is, the approximate number of 6. Because the approximate number appears in pairs, the number of times that 6 is switched off is an even number.

However, for the total number of segments such as 4 and 16, since they all have an approximate number k, so that the square of K is equal to the total number of segments, the number of times it is switched off should be an odd number, because K can only be counted once.

Therefore, the answer to this question is only 1-full records, which is on.

That is, the 10 lights of 81,100, are on.

* Note:

Full partitions:If a number is the full square of another integer, we call it the full square number, also known as the limit number.

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.