# For Geeks & Brainiacs #07- Splitting Up The Gold -

13 pirates (including the captain) are sitting down at a table in a tavern. All eyes are on the pile
of gold coins at the center (their day's plunder). The captain is a fair man and decides to distribute the
coins equally. He hands out the coins one by one to each of the pirates (including himself). There are
3 extra coins though at the end. A fight ensues over how the remaining coins should be divided. A
particularly violent pirate is kicked out by the owner of the tavern, leaving behind his share of coins
on the table. The captain takes the ousted pirate's coins along with the 3 extra coins and distributes
them equally as before to the 12 remaining pirates (including himself). Once again, there are extra coins
at the end, 5 this time! Tempers flare once more on how the remaining coins should be divided. Fearing
another brawl, the captain kicks out the loudest pirate, leaving behind his share of coins on the table as
before. The captain takes the newly ousted pirate's coins along with the 5 extra coins and distributes
them to the remaining 11 pirates (including himself). Thankfully there are no extra coins this time.

Afterwards, the captain wonders how many gold coins there were at the beginning. He knows for sure that
there were less than 1000. Can you figure out how many gold coins there were in all?

(Retelling of a puzzle by Robert B., NSA Applied Mathematician)

**HINT**: To solve the puzzle, you need to work backwards.

**ANSWER**:

*341.*
**EXPLANATION**: The puzzle is solved by working backwards. We know four things: The
total number of coins is under 1000, the total number of coins is a multiple of 11 (the coins were
evenly divided among 11 pirates), the total number of coins divided by 12 yields a remainder of 5,
and the total number of coins divided by 13 yields a remainder of 3.

Only one row in the table below meets those criteria:

Multiples of 11 |
Rem when divided by 12 |
Rem when divided by 13 |

11 |
12 |
13 |

22 |
10 |
9 |

33 |
9 |
7 |

44 |
8 |
5 |

55 |
7 |
3 |

66 |
6 |
1 |

77 |
5 |
12 |

88 |
4 |
10 |

99 |
3 |
8 |

110 |
2 |
6 |

121 |
1 |
4 |

132 |
0 |
2 |

143 |
11 |
0 |

154 |
10 |
11 |

165 |
9 |
9 |

176 |
8 |
7 |

187 |
7 |
5 |

198 |
6 |
3 |

209 |
5 |
1 |

220 |
4 |
12 |

231 |
3 |
10 |

242 |
2 |
8 |

253 |
1 |
6 |

264 |
0 |
4 |

275 |
11 |
2 |

286 |
10 |
0 |

297 |
9 |
11 |

308 |
8 |
9 |

319 |
7 |
7 |

330 |
6 |
5 |

341 |
5 |
3 |

352 |
4 |
1 |

363 |
3 |
12 |

374 |
2 |
10 |

385 |
1 |
8 |

396 |
0 |
6 |

407 |
11 |
4 |

418 |
10 |
2 |

429 |
9 |
0 |

440 |
8 |
11 |

451 |
7 |
9 |

462 |
6 |
7 |

473 |
5 |
5 |

484 |
4 |
3 |

495 |
3 |
1 |

506 |
2 |
12 |

517 |
1 |
10 |

528 |
0 |
8 |

539 |
11 |
6 |

550 |
10 |
4 |

561 |
9 |
2 |

572 |
8 |
0 |

583 |
7 |
11 |

594 |
6 |
9 |

605 |
5 |
7 |

616 |
4 |
5 |

627 |
3 |
3 |

638 |
2 |
1 |

649 |
1 |
12 |

660 |
0 |
10 |

671 |
11 |
8 |

682 |
0 |
6 |

693 |
9 |
4 |

704 |
8 |
2 |

715 |
7 |
0 |

726 |
6 |
11 |

737 |
5 |
9 |

748 |
4 |
7 |

759 |
3 |
5 |

770 |
2 |
3 |

781 |
1 |
1 |

792 |
0 |
12 |

803 |
11 |
10 |

814 |
10 |
8 |

825 |
9 |
6 |

836 |
8 |
4 |

847 |
7 |
2 |

858 |
6 |
0 |

869 |
5 |
11 |

880 |
4 |
9 |

891 |
3 |
7 |

902 |
2 |
5 |

913 |
1 |
3 |

924 |
0 |
1 |

935 |
11 |
12 |

946 |
10 |
10 |

957 |
9 |
8 |

968 |
8 |
6 |

979 |
7 |
4 |

990 |
6 |
2 |

Do you have a

suggestion for this puzzle (e.g. something that should
be mentioned/clarified in the question or solution, bug, typo, etc.)?