Jane Street

## Interview Question

## Interview Answer

6 Answers

Two facts to note are:

1) Multiplies of 225 end in 00 25 50 75

2) A number is divisible by 9 if the digits sum to 9.

Only those multiples ending in 00 could have only 1's and 0's.

So, the smallest digit we can multiply 225 by to get 00 at the end is 4. That is,

225*4=900. Now, we want to find the smallest multiple of 900 that contains only 1's and 0's. Let us first focus on 9 and then tack on the 00 after. The smallest multple of 9 with only 1's and 0's is 111111111. This is a consquence of the fact that the digits must sum to 9. Now, we tack on the 00 at the end and obtain 11111111100.

WRONG

1111111110.

Think of 225 as (5)^2(9). So this number must end in a 0 to be divisible by 5. Since every number that 5 divides ends in a 5 or 0, that number is also divisible by 5. Since a number divisible by 9 must have the digits sum to a number divisible by 9, then all we need is 9 1's and a 0 on the end for 1111111110.

1111111110 / 225 = 4938271.6

I fail to understand the above answers. Shouldn't it be 225 or 2250. 225/225 =1 and 2250/225 =10. Both these numbers contain just 1's and 0's

:P

The above answers seem too complicated/not explained at all.

First, notice that 225 = 25 * 9.

(1) A number is divisible by 9 iff the sum of its digits is divisible by 9 => we must have 9 1's in our number.

(2) A number is divisible by 25 iff the last two digits are divisible by 25 => our last two digits must be 0's.

Putting (1) and (2) together, our number is 11111111100.

## Add Answers or Comments

To comment on this, Sign In or Sign Up.

11111111100