### Flowers Owned By Pilgrim

Let's assume that the pilgrim had X number of flowers initially. Suppose that he offered Y flowers to the each God.

Before entering into the first temple, magical well doubled the flowers he had initially. That means he had 2X flowers before entering into first temple. After offering Y flowers, he had 2X - Y flowers.

Again after visiting first temple he washed flowers in magical well where number of flowers gets doubled. Now, he had 4X - 2Y.

Out of these 4X - 2Y, he offered Y flowers to God in second temple. So he had 4X - 2Y - Y = 4X - 3Y flowers after visiting second temple.

These 4X - 3Y doubled to 8X - 6Y after washing in magical water well.

At third temple, he offered all the flowers he had which in turn equal to Y as we assumed.

8X - 6Y = Y

8X = 7Y

X/Y = 7/8

This is the ratio of the flowers that pilgrim had to the flowers he offered to each God.

In general, the pilgrim had 7N flowers initially and he offered 8N flowers to each God, where N = 1, 2, 3, 4,

Let's cross verify same with N = 1, meaning that the pilgrim had 7 flowers initially & offered 8 flowers to each God.

Before entering into first temple, the flowers doubled to 14. Out of which, 8 offered at first temple & left 6.

Again 6 doubled to 12 at magical well & 8 out of 12 offered to God at second temple leaving behind 4.

Those 4 again doubled to 8 by magical well & all 8 offered to God at third temple.