Author 
Message 
SVP
Joined: 03 Feb 2003
Posts: 1604

One writes a list of numbers from 1 to 1000. How many ones [#permalink]
Show Tags
26 Sep 2003, 12:05
Question Stats:
0% (00:00) correct
0% (00:00) wrong based on 0 sessions
HideShow timer Statistics
This topic is locked. If you want to discuss this question please repost it in the respective forum.
One writes a list of numbers from 1 to 1000. How many ones will he have to write?



SVP
Joined: 03 Feb 2003
Posts: 1604

guys, what are you waiting for? give it a try.



Manager
Joined: 13 Aug 2003
Posts: 68
Location: India

a tricky one... just giving a shot though... hundrets place 100 + tens place 90 and units 90 == 280.. not too sure still...



Manager
Joined: 13 Aug 2003
Posts: 68
Location: India

a tricky one... just giving a shot though... hundrets place 100 + tens place 90 and units 90 == 280.. not too sure still...



Manager
Joined: 26 Aug 2003
Posts: 233
Location: United States

I have this formula I ended up deriving after encountering couple of problems like this one, here it goes:
Setp 1: Make places for as many number of digits as the number of zero's after 1.
Setp 2: The first digit is the number of zeros after 1.
Setp 3: Then rest of the digits are zero.
Setp 4: Add one to this number if your upper range number is included in the count.
So... for this problem
Step 1: _ _ _
Step 2: 3 _ _
Setp 3: 3 0 0
Setp 4: 3 0 1
So total number of zero's between 1 and 1000, inclusive, is 301.
This count formula also works for all other digits except you don't do the Step #4. Of course, this formula has certain rules if your range doesn't end at a number that has 1 and tailing zeros. Which I'll mention some other time when I have more time at hand.

Another way.
(# of zeros) * (Upper Range/10) [+ 1] = total number of 1's in the range
where [+ 1] is optional depending on your upper limit.
In this case:
3 * (1000/10) + 1 = 301



SVP
Joined: 03 Feb 2003
Posts: 1604

consider onedigit numbers: the only 1
consider twodigit numbers: X1 (eight such numbers), 1X (nine) and 11. In total there are 8+9+2=19
consider threedigit numbers: XX1 (8*9=72), X1X (8*9=72), 1XX (9*9=81), 11X (9*2=18), 1X1 (9*2=18), X11 (8*2=16), and 111 (3). Total:72+72+81+18+18+16+3=280
1000 gives one 1.
Overall: 1+19+280+1=301










