# 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.

## Recommended Posts:

- Puzzle 1 | (How to Measure 45 minutes using two identical wires?)
- Puzzle 2 | (Find ages of daughters)
- Puzzle 3 | (Calculate total distance travelled by bee)
- Puzzle 4 | (Pay an employee using a 7 units gold rod?)
- Puzzle 13 | (100 Prisoners with Red/Black Hats)
- Puzzle 5 | (Finding the poisoned wine)
- Puzzle 6 | (Monty Hall problem)
- Puzzle 7 | (3 Bulbs and 3 Switches)
- Puzzle 8 | (Find the Jar with contaminated pills)
- Puzzle 9 | (Find the fastest 3 horses)
- Puzzle 10 | (A Man with Medical Condition and 2 Pills)
- Puzzle 11 | (1000 Coins and 10 Bags)
- Puzzle 12 | (Maximize probability of White Ball)
- Puzzle 14 | (Strategy for a 2 Player Coin Game)
- Puzzle 15 | (Camel and Banana Puzzle)

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.