Find the number of pages in the book

1

Sheldon is so bored that he started counting the number of digits used to represent the each page in the book he was reading. The pages are numbered in sequential order starting from 1.If the total number of decimal digits used is 189 can you find out the number of pages in the book ?

Answer in comment section 🙂

Number the door from 1 to 500.Let’s start with some examples- door 12 is toggled on days 1,2,3,4,6,12;door 3 is toggled on day 1 and 3;door 1 is toggled on day 1;door 5 on 1 and 5.All doors are initally closed.What are the doors that are open at the end?

0

A door is toggled as many times as its number has divisor(this is obvious from the patterns shown in the question).

Divisors come in pairs: 2*3,6*1,1*5

So door with number having even divisors are finally closed.

Numbers which have odd number of divisors are perfect squares.So 1,4,9,16,25,36,….484 are doors that are open at the end!