In a holy town, three temples sit in a row identical in almost every manner including a holy well in front of them. A pilgrim comes to visit the temples with some flowers in his basket.

At the first temple, he takes some water from the holy well and sprinkles it on the flowers to wash them. To his astonishment, the number of flowers in his basket doubles up. He offers a few of them at the temple and turns back to visit the second temple.

At the second temple, he again takes some water from the holy well and sprinkles it on the flowers to wash them. Again the number of flowers double up in number. He offers some of them at the temple and turns back to visit the third temple.

At third temple he repeats the process again and the number of flowers double up yet again. He offers all the flowers in the third temple.

Now, the pilgrim offered exactly the same number of flowers in all the temples. Can you find out the minimum number of flowers he must have had initially? How many flowers did he offer to god in each of the three temples?

Let us assume that there were x flowers present in the basket of the pilgrim and he offered y flowers at each temple. Now as per the details given in the question, the number of flowers when he came out of the third temple.

But the number of flowers when he comes out of the third temple must be (8x – 7y)

Thus (8x – 7y) = 0
8x = 7y

Now the minimum values that you can put by hit and trial are 7 and 8 for x and y respectively.

Thus, the pilgrim had 7 flowers in the beginning and he offered 8 flowers at each temple.

Discussion