100 candles problem

Logic Level 2

There are 100 100 candles which are numbered from 1 to 100.There are 100 students. The 1st student lights up all the candles. The 2nd student changes the state of the candles(lights up or lights off) which are multiples of 2 2 . The 3rd student changes the state of the candles(lights up or lights off) which are multiples of 3 3 .

This continues till the 100th student.

Find how many candles are still lightened up in the end.


The answer is 10.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

X X
Aug 5, 2018

It is same as "How many numbers from 1 to 100 has odd amount of positive divisors?"

All perfect squares has odd amount of positive divisors,so the answer is 1,4,9,...,100,total of 10 candles.

Mohammad Farhat
Aug 5, 2018

Before tackling the problem lets lay down some facts,

  • If a candle which is lighted off it needs to have an even amount of factors*

(explanation: because the lighting and lighting off cancel each other out)

*Factors is in regard to the candle number

  • So, a candle which is lighted on needs to have an odd number of factors*

So we can list down the numbers which numbers have an odd number of factors.**

** There is a faster but similar way

Before we list off to 100, we can just list off to 20. The reason being is that we need the pattern not a hardworking trial and error machine.

<-- Pause (do it on your own before i reveal the answer)-->

OK. The odd-number-factor numbers should be 1,4,9,16 We can now get the ah-ha moment. All of the numbers are perfect squares. So, we happily write down the perfect squares from 1 to 100 and count them.

But there is an even faster way! Simply take the square root of 100 which is 10 and Voila. ( In the case of an irrational number just take the [whole number] quotient.)

Why did you followed me and again unfollowed me .

Ram Mohith - 2 years, 10 months ago

Log in to reply

Because the coloring of the words were confusing. so it took me a while to understand it

Mohammad Farhat - 2 years, 10 months ago

Log in to reply

But again you did the same. You followed me and unfollowed again.

Ram Mohith - 2 years, 10 months ago

Log in to reply

@Ram Mohith that time was just for fun now I will really follow you

Mohammad Farhat - 2 years, 10 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...