Puzzle | Guess the total number of coins

There are 10 robbers named as’A’, ‘B’, ‘C’, ‘D’, ‘E’, ‘F’, ‘G’, ‘H’, ‘I’, ‘J’ they stole some coins from a bank and they decided to divide these coins equally among themselves. So they divide the coins into 10 parts but the last robber ‘J’ got 1 coin less than other robbers. So the remaining 9 robbers murder ‘J’. They again decided to divide the coins into 9 parts. But this time again the last robber ‘I’ got 1 less coin than other robbers. So again the remaining 8 robbers murder ‘I’ and try to divide all coins in between remaining 8 robbers. But again this time ‘H’ got one less coin than the other. Now, this process goes on until 1 robber left i.e. is ‘A’. After that ‘A’ take all the coins and run away. Now you have to guess the total number of coins.

Answer: 2519

Explanation:
In a first attempt if there was 1 more coin then the coins could be easily divided among 10 robbers. And in the second attempt also the coins could be equally divided in among 9 robbers and so on. So let just add one coin to the total number of the coin. So the total coins become N+1.
now this (N+1) should be divisible by 10. It should be divisible by 9, 8, 7, 6, 5, 4, 3, 2, 1.
So our answer should be LCM of (10, 9, 8, 7, 6, 5, 4, 3, 2, 1).
Total Number of coins = LCM of (10, 9, 8, 7, 6, 5, 4, 3, 2, 1) which is 2520.
Now we have to subtract 1 coin which we have added before, so the total number of coins is 2519.



My Personal Notes arrow_drop_up


If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.




Article Tags :
Practice Tags :


3


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.