because, only the perfect square number has odd number of factors. so, toggling will make those door to remain open. Like open-close-open-close-open (odd no of toggle)
On 5/31/10, sharad kumar <aryansmit3...@gmail.com> wrote: > @veera:only the perfect square numbers will be open > 1,4,9,16,25...100 > > On Mon, May 31, 2010 at 9:37 AM, Veer Sharma > <thisisv...@rediffmail.com>wrote: > >> Hi Friends, >> >> Here's a problem from my side: >> >> 100 rooms are in a prison. All doors are closed initially. A policeman >> on round i will toggle the doors that are in multiples of i. >> After 100 rounds, which doors will be open? >> >> >> Lets try get a solution. >> >> Thanks, >> Veer >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Algorithm Geeks" group. >> To post to this group, send email to algoge...@googlegroups.com. >> To unsubscribe from this group, send email to >> algogeeks+unsubscr...@googlegroups.com<algogeeks%2bunsubscr...@googlegroups.com> >> . >> For more options, visit this group at >> http://groups.google.com/group/algogeeks?hl=en. >> >> > > > -- > yezhu malai vaasa venkataramana Govinda Govinda > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algoge...@googlegroups.com. > To unsubscribe from this group, send email to > algogeeks+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.