## Sollicitatievraag

Sollicitatiegesprek voor de functie Applications Developer

-

# 10 people can share a bucket of coins equally. A monkey steals one coin. The no of coins are one less than equal share. one person after the other tries to take the coin but monkey kills them(killing spree?? :-)). each time a person dies the no of coins are always one short of equal share. what were the no of coins originally?.

Antwoord

## Antwoorden op sollicitatievragen

11 antwoorden

5

I wont give the answer. Hint : know who divides you ;-)

Anoniem op

2

I think 2520 is perfect

Anoniem op

1

Answer is pretty simple: m%10=0 -----case 1 Lets assume n=m-1 Since the remainder is always same , when n is divider by any number from 10 to 1.. n%10 = n%9=.........=1 That means n+1 is completely divisible by all numbers from 10 to 1.. (Since it gives common remainder).. n + 1= Lcm of (1 to 10) = 2520 But we assumed n = m-1, so m -1+1 =m = 2520

0

Yes any Common multiple of the factors is a solution.

Anoniem op

0

sweet:-) nice ans. also think of 10! since the numbers in factorial are the remaining people after each iteration(2x3x4x5x6x7x8x9x10) and they form factors of the factorial number. and the factorial - 1 will always be one less than equal share. this fits the solution:-)

Anoniem op

0

if monkey steal one coin then as per your ans coins==9. then one person dies so 9%9 is==0. which is not possible. it is not 20 also just to give a bigger hint.:-)

No :-) op

1

Exact answer is 30 coins. Since each time monkey kills one person.

Anoniem op

0

This is correct for 10 coins as well

Anoniem op

0

suppose initial coins were 30 then money steals one coin so #coins = 29. now 10 people are there and the no of coins are 1 less than equal share i.e if 30 coins were there 3 per person but only 29 coins are there. so this case is ok. lets look for 9 people, since monkey kills one guy. now for 9, 29 is not one short of equal share because 9*3 ==27 , 9*4 == 36 neither of which satisfy the condition. so 30 cannot be the original coins. same thing for 8,7,6,.. 10 coins cannot be the original. Please read the question carefully.. this hint will be the closest to the answer, keep this part of the question in mind : "each time a person dies the no of coins are always one short of equal share".

not 30. the question has to be read very carefully. op

0

I think it is 2520 i.e.LCM of 2-10

Krunal op

0

Multiples of 2520 will be the answer

Anoniem op

## Voeg antwoorden of opmerkingen toe

Meld u aan of registreer u om hier een opmerking over te maken.