+0  
 
0
692
3
avatar

It takes 1629 digits to number the pages of a book. How many pages does the book have?

 Jul 1, 2020
 #1
avatar+781 
+1

From numbers 1-9, 9 digits are used. From numbers 10-99, 90*2=180 digits are used. From numbers 100-999, 900*3=2700 digits are used. The number of pages in this book must fall somewhere between 100-999. We already have 180+9=189 digits. 

 

1629-189=1440.

 

We divide 1440 by 3 to find the number of pages between 100-999. We get 480 pages.

 Jul 1, 2020
 #3
avatar+37146 
+1

480   pages PLUS the first 99 pages = 579 pages    cheeky

ElectricPavlov  Jul 1, 2020
 #2
avatar
0

n=579;m=1;r=n;s=0;d=0; c=1;p=0;cycle1:s=s+n%10;d=d+1;n=int(n/10);if(n!=0, goto cycle1, 0); p=(r-m+1)*d;loop1:p=p-(9*(d-c)*10^(c-1) ;c++;if(c<=d, goto loop1, 0);print"Total Num =",p;print"Total Sum =",;

 

 

OUPUT: 1629 pages is the number of pages from 1 to 579 inclusive. Therefore, the book has 579 pages.

 Jul 1, 2020

1 Online Users