Learn the most important control and control categories that every architect and developer should include in their projects.

Experts Exchange Solution brought to you by

Enjoy your complimentary solution view.

Get this solution by purchasing an Individual license!
Start your 7-day free trial.

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

I get 1,000,051 employees.

1 to 9

20 to 29

30 to 39

40 to 49

50 to 59

60 to 69

70 to 79

80 to 89

90 to 99 is 189 digits

Then 100 to 999 is 270 digits

1000 to 9999 is 360 digits

10000 to 99999 is 450 digits

100,000 to 999,999 is 540 digits

1,000,000 to 1,000,029 is 210 digits

189+270+360+450+540+210 = 2019

1,000,030 to 1,000,051 = 21

Total is 2040.

Ends in 1 because no employee number 0

This one is tricky and you need to write down the groups to see.

Up to 1,000,029 is 2019 digits.

then 1,000,030 is 7, 1,000,031 is 7 1,000,032 is 7 and 2019 +21 = 2040

So the number is 1,000,032 (not 051).

Total is 1,000,032

110-119 --> 30 digits

...

190-199 --> 30 digits

______________________

100-199 -->10 * 30 = 300 digits

200-299 = 300 digits

900-999 = 300 digits

_________________________

100-999 = 9 * 300 = 2700 digits

Hope you can take it from here.

As you've already seen you are looking for the total number of digits used to count from "One" to "Total Number of Employees"

counting the first nine use one digit each 1, 2, 3, 4...

So to get to employee Nine you'll have used only 9 of the 2040 digits

Then from employee 10 to employee 99 you'll use two digits each time

That's another ninety employees (99 = 90 less the 9 you've already dealt with) so at two digits each that's 180 for 10-99 plus the 9 single digits

So you've used 189 digits to count from 1-99

Between 100 and 999 each employee number uses three digits at most that's 899 x 3 digits which = 2697

Your question only gives you 2040 digits to use so you know there are less than 1000 employees

So:

You have only 2040 digits to account for

To count the first 99 uses 189 digits

You know all the additonal employees will use three digits each:

Employee 100 = 190 digits used

Employee 101 = 191 digits used

...

and so one - but there's a quicker way to get to that mathematically.

Your questions all ask you to use logic AND mathematics, as they increase in complexity more thought about how you need to use simple math to get to a solution becomes needed.

If you have an option in a timed test to skip questions and return to complete them later pick off those you are certain of quickly and come back later to those that need more thought/reasoning.

There are 9 one-digit numbers: 1 - 9 using 9 digits.

There are 90 two-digit numbers: 10 - 99 using 180 digits.

There are 2040 -189 = 1851 digits left for exactly 617 three-digit numbers starting at

So I get

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trialIt's a shame they didn't use leading "0"s :)

Off by one: If there are 999 employees, then (999 - 100 + 1) = 900 employees will have 3 digit numbers, in which case there are 900 x 3 digits = 2700 digits.

From this we conclude that 100 < N < 999.

It looks to me like d-glitch is giving you the correct answer.

What answer are expecting?

>> If I get this on the test, I'll

If you do not have time to answer all the questions, then skip the hardest ones, I guess. But, the point of this partitioning exercise is to see how well you think. I advise to show the partitioning that you learned here and come up with an answer even if it turns out to be wrong.

>> It's a shame they didn't use leading "0"s :)

In a real company, they probably would do that, or just start the numbering scheme with 10000 (reserved for the CEO). :)

CHECK

Suppose you have N = 716 employees.

1-9 employees --> 9 digits

10-99 employees --> (99 - 10 + 1) * 2 = 90*2 = 180 digits

100-716 employees --> (716 - 100 + 1) * 3 = 617 * 3 = 1851 digits

Add up the three partitions: 9 + 180 + 1851 = 2040 digits

The idea of sub-dividing a problem into smaller partitions is an important concept in problem solving. It is best to show your ability in this regard if you are writing on a whiteboard. Draw lines or boxes to show the individual partitions and work on each one separately.

BTW, this problem is quite a bit harder than your previous problem. As you can see, this problem even got some experts close but not quite on target. One of the pitfalls is to realize that when counting from 0 or from 100, you have to take special care because we are used to counting from 1.

Put a

Then do a running total in Col 2 and look for 2040.

This takes less than 2 minutes and confirms my answer.

You can also solve this programmatically with

1-9 @ n=1 (9x1) =9 numerals (9 staff)

10-99 @ n=2 (90x2) = 180 numerals (90 staff)

189 numerals used to cover 99 staff

number of numerals left to issue to staff 2040-189 = 1851

Each remaining staff member needs three numerals so (1851/3) = 617

These 617 people added to the other 99 = 716 staff

741.

Math / Science

From novice to tech pro — start learning today.

Experts Exchange Solution brought to you by

Enjoy your complimentary solution view.

Get this solution by purchasing an Individual license!
Start your 7-day free trial.

The rest are three-digit numbers.