Puzzle | Pirates and Gems
Seven pirates attacked the British ship and looted some rare gems from them. They decided to rest for some time and then divide the gems later. While everyone was resting, two pirates wake up and planned to divide gems equally between the two. When they divided gems equally, one gem was left. So, they decided to wake up the third pirate and divide among three, but alas again one gem was left. They decide to wake up the fourth pirate to divide the gems and again one gem was left. The same happened again with the fifth and sixth. Finally, they woke up the 7th pirate and this time the gems were divided equally.
How many minimum gems did they stole in total?
1. When there are two pirates, 301/2 = 1 (Remainder)
2. When there are three pirates, 301/3 = 1 (Remainder)
3. When there are four pirates, 301/4 = 1 (Remainder)
4. When there are five pirates, 301/5 = 1 (Remainder)
5. When there are six pirates, 301/6 = 1 (Remainder)
6. When there are seven pirates, 301/7 = 0 (Remainder)
This article is contributed by Zikra Iqbal. If you like GeeksforGeeks and would like to contribute, you can also write an article using write.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.
Please Login to comment...