** Puzzle: **Rama started on a quest of visiting temples, with few coins in his pockets. As soon as he visits any temple, the money in his pocket gets doubled and on his way out, he donates Rs. 100 to each temple. He visits 4 temples on his quest. After visiting the last temple, his pocket is empty of all the money, so how much money he had initially.

** Solution: ** Let’s assume Rama began his quest with Rs. x.

**1st Temple:**As soon as he enters the temple, his money is doubled to 2x. On his way out he donates Rs. 100. Therefore, he is left with Rs. Rs. (2x – 100).

**2nd Temple:** As soon as he enters the temple, his money is doubled to 2(2x – 100). On his way out he donates another Rs. 100 and he is left out with Rs. (4x – 300)

**3rd Temple:** As soon as he enters the temple, his money is doubled to 2(4x – 300). On his way out he donates another Rs. 100 and he is left with Rs. (8x – 700)

**4th Temple:** As soon as he enters the temple, his money is doubled to 2(8x – 700). On his way out he donates another Rs. 100 and he is left with Rs. (16x – 1500).

According to the question, after his last visit, he completely runs out of money.

Therefore, => 16x - 1500 = 0; => x = 1500/16; => x = 93.75

Rama had started his quest with Rs 93.75 in his pocket.

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the **DSA Self Paced Course** at a student-friendly price and become industry ready.

## Recommended Posts:

- Puzzle 15 | (Camel and Banana Puzzle)
- Puzzle 24 | (10 Coins Puzzle)
- Puzzle 27 | (Hourglasses Puzzle)
- Puzzle 28 | (Newspaper Puzzle)
- Puzzle 29 | (Car Wheel Puzzle)
- Puzzle 31 | (Minimum cut Puzzle)
- Puzzle 33 | ( Rs 500 Note Puzzle )
- Puzzle 34 | (Prisoner and Policeman Puzzle)
- Puzzle 36 | (Matchstick Puzzle)
- Puzzle 38 | (Tic Tac Toe Puzzle)
- Puzzle 39 | (100 coins puzzle)
- Puzzle 51| Cheryl’s Birthday Puzzle and Solution
- Puzzle 81 | 100 people in a circle with gun puzzle
- Puzzle 85 | Chain Link Puzzle
- Puzzle | Elevator Puzzle
- Puzzle | 3 Priests and 3 devils Puzzle
- Puzzle | Man fell in well Puzzle
- 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)

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.