A royal palace has 1 0 0 0 rooms numbered 1 to 1 0 0 0 . Each room is maintained by a cleaner bearing the room number. Each morning, cleaner number 1 will open all the room doors. Cleaner number 2 will close all the doors of room with numbers divisible by 2 . Cleaner number 3 will then approach rooms with numbers divisible by 3 . If the room door is opened, he will then close it, if the door is closed, he will then open it. Cleaner number 4 will take care of all the rooms with numbers divisible by 4 . He will open closed doors and close opened doors.
This process goes on until every cleaner( 1 0 0 0 cleaners) has done his job. At the end, how many room doors remained open?
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.
A perfect square has odd number of factors. Thus, the doors with a perfect square will remain open.
Firstly, note that (a) If a room number has an even number of factors, this means that there will be an even number of cleaners opening and closing the door, so it will end up closed. (b) The opposite is true if it has an odd number of factors. Note that if a number, n, has an odd number of factors, it must be a square. Otherwise, for any factor of n, let's say x which less than the square root of n, there will be a corresponding factor different from x, x n . Thus only perfect squares have an odd number of factors, and there are 31 of them less than 1000 as 3 1 2 < 1 0 0 0 < 3 2 2 . So the answer is 31.
Let
f
(
x
)
=
⌊
x
⌋
be the greatest integer less than or equal to
x
.
We can find the
cardinality of perfect square numbers
from
1
to
x
2
by taking
f
(
x
)
.
Example:
There are 10 perfect squares between 1 to 100 (1, 4, 9, 16, 25, 36, 49, 64, 81, 100) since f ( 1 0 0 ) = ⌊ 1 0 ⌋ = 1 0 , while there are only 4 perfect square numbers between 1 to 20 (1, 4, 9 and 16) since f ( 2 0 ) = f ( 4 . 4 7 ) = 4 .
We take f ( 1 0 0 0 ) = ⌊ 3 1 . 6 2 ⌋ = 3 1
Whether the door is closed or open depends on number of times accessed. If it is accessed odd number of times, then it is open while if it is accessed even number of times then it is closed. How many times a door will be accessed depends on the locker number. If it contains odd number of factors - it will be closed. We know that ONLY a perfect square contains odd number of factors. Thus the lockers with perfect square numbers will be open and the number of these perfect squares from 1 to 1000 decides whether a room is open or not. There are 31 perfect squares between 1 to 1000. So, 31 rooms will remain opened.
a door will remain open if it has got odd no .of factors...meaning it will be acted upon odd no of times...so basically only perfect squares has odd no of factrs...so the answer will be no of prfct squres present within 1000 .which is 31 as 32*32=1024 >1000
Whether a door will be open by the end is dependent on the number of factors it has. If it has an even number of factors, an even number of people will approach the door, and so it will remain closed by the end. If it has an odd number of factors, it will be open. However, every number's factors can be listed as pairs: for example, 2 4 can be written as 1 × 2 4 , 2 × 1 2 , 3 × 8 and 4 × 6 . Therefore, most numbers have an even number of factors and their doors will remain closed. However, when doing this with square numbers, one factor is repeated as it is multiplied by itself, for example with 1 6 : 1 × 1 6 , 2 × 8 and 4 × 4 . This means that square numbers have an odd number of factors, so only these doors will be open by the end. The highest square below 1 0 0 0 is 3 1 2 , so the answer is 3 1 .
The first thing that came to my mind is the fact that a door will remain open in the end if and only if it is operated an odd number of times.and as the question suggests, the number of times the i-th door will be operated is equal to the number of divisors i has.So the only task I am left with is to find the number of positive intigers which have odd number of divisors. Now,most of the positive integers have an even number of divisors. This is because, generally, if 'i' is divisible by 'a', then there should exist another integer 'b' such that a*b=i.Thus, divisors come in 'pairs'.But this is not true for perfect squares.If 'i' is a perfect square i.e. i= c^2, then dividing 'i' by 'c' gives 'c', which is not a new divisor.So a perfect square can not have even number of divisors. So, for this problem, we need to find the number of perfect squares less than 1000.taking the floor of the square root of 1000,we get the answer 31.
If it ends with the door open, then the quantity of divisors of that number is odd. A number with an odd quantity of divisors is forced to be a perfect square, because when we factorize a perfect square, there will be always a factor repeated (the root). For example, 9 = 1 ⋅ 9 = 3 ⋅ 3 . From 1 to 1 0 0 0 there are 3 1 perfect squares, and so our answer is 3 1 .
try at small scale of upto 10 or observe that door numbered such that it has odd number of divisors is open . All perfect square numbered doors are open. hence the ans is 31.
and by the way it is technotholon question
Problem Loading...
Note Loading...
Set Loading...
It's has to do with the factors of numbers.
The number of factors of perfect squares will be odd since one of its factor is its square root.
For example, factors of 36 = (1 , 36) ( 2 , 18) ( 3 , 12) ( 4 , 9) ...and 6 (It cannot be paired because it can only be paired itself ..6,
which is the same number)
And therefore number of perfect squares' factors will always be odd
To keep each door closed, the number of times we open it and the number of times we close it must be equal.
Or, in other words, the number of actions must be even.
And if the number of action is even, then it means that the factors of the door number must even ,too.
And that means only non perfect squares will remain closed.
So to find the number of the room that will remain open, we must find number of perfect square less than 1000
And there 31 [ 1 , 4 , 9 , 16 , 25 , 36 , 49 , 64 , 81 , 100 , 121 , 144 ,......, 961(31^2) ]
So the answer is 31