TCS
Company
Numerical Ability
Number System
In a hostel there are 1000 students in 1000 rooms. One day the hostel warden asked the student living in room 1 to close all the doors of the 1000 rooms. Then he asked the person living in room 2 to go to the rooms which are multiples of his room number 2 and open them. After he ordered the 3rd student to reverse the condition of the doors which are multiples of his room number 3. If He ordered all the 1000 students like the same, Finally how many doors of those 1000 rooms are in open condition?
Read Solution (Total 11)
-
- 1000-31 = 969
doors having numbers other than perfect squares are open . - 12 years agoHelpfull: Yes(25) No(7)
- 500 rums will be in open cndition..
1st student 1,2,3,4,5,6,7,8,.. closed
2nd student- 2,4,6,8,10,12.... open
3rd- 3,6,9,12,15,18,... close
4th- 4,8,12,16,20,.... open
frm above rum 2 will be opened. like this frm 4th stdnt, rum 4 will be opened...
like this, 6,8,10,12,14,,, 1000 rum will be in open cndition... so ans will be 500.. - 12 years agoHelpfull: Yes(6) No(10)
- all the numbers will have multiples except prime numbers.. so consider no.of prime numbers from 1 to 1000. as there are 168 prime numbers 1000-168=832... 832 are opened
- 12 years agoHelpfull: Yes(6) No(4)
- why we have to consider the perfect squares? what is the procedure?
- 12 years agoHelpfull: Yes(2) No(6)
- no.of closed doors = no.of perfect squares bellow that number(here 1000)
therefore opened doors=1000-31(no.of perfect squares bellow 1000)
=969 - 12 years agoHelpfull: Yes(2) No(3)
- We understand that a door is in open or in close condition depends on how many people visited the room.
If a door is visited by odd number of persons it is in close condition, and is visited by even number of persons it is in open condition.
The number of people who visit a certain door is the number of factors of that number. Let us say room no: 24 is visited by 1, 2, 3, 4, 6, 8, 12, 24 which are all factors of 24. Since the number of factors are even this door is in open condition.
we know that the factors of a number N=a^p.b^q.c^r..... are (p+1).(q+1).(r+1)...
From the above formula the product is even if any of p, q, r... are odd, but the product is odd when all of p, q, r are even numbers.
If p, q, r ... are all even numbers then N=a^p.b^q.c^r.... is a perfect square.
So for all the perfect squares below 1000 the doors are in closed condition.
There are 31 perfect squares below 1000 so total doors which are in open condition are (1000-31)= 969 - 8 years agoHelpfull: Yes(2) No(0)
- All the prime numbers till 1000.
- 12 years agoHelpfull: Yes(1) No(6)
- 372 rums will be in open cndition..
1st student 1,2,3,4,5,6,7,8,.. closed
2nd student- 2,4,6,8,10,12.... open....=500
3rd- 6,12,18,...multiple of 6.. close...=166
3th- 3,9,15,21,....multiple of 3 but not divided by 2 open.....=167
so ans will be (500-166)+167 =334+167 =501 ans - 12 years agoHelpfull: Yes(1) No(2)
- RAJITHA WT ABT PRIME NUM ITSLF
- 12 years agoHelpfull: Yes(1) No(0)
- agree with Yalamarthyrajitha
- 12 years agoHelpfull: Yes(1) No(0)
- We understand that a door is in open or in close condition depends on how many people visited the room.
If a door is visited by odd number of persons it is in close condition, and is visited by even number of persons it is in open condition.
The number of people who visit a certain door is the number of factors of that number. Let us say room no: 24 is visited by 1, 2, 3, 4, 6, 8, 12, 24 which are all factors of 24. Since the number of factors are even this door is in open condition.
we know that the factors of a number N=ap.bq.cr…ap.bq.cr… are (p+1).(q+1).(r+1)…
From the above formula the product is even if any of p, q, r… are odd, but the product is odd when all of p, q, r are even numbers.
If p, q, r … are all even numbers then N=ap.bq.cr…ap.bq.cr… is a perfect square.
So for all the perfect squares below 1000 the doors are in closed condition.
There are 31 perfect squares below 1000 so total doors which are in open condition are (1000-31)= 969 - 5 years agoHelpfull: Yes(0) No(0)
TCS Other Question