**Question: **A person wanted to withdraw X rupees and Y paise from the bank. But cashier made a mistake and gave him Y rupees and X paise. Neither the person nor the cashier noticed that.

After spending 20 paise, the person counts the money. And to his surprise, he has double the amount he wanted to withdraw.

Find X and Y. (1 Rupee = 100 Paise)

**Answer:**

As given, the person wanted to withdraw 100X + Y paise.

But he got 100Y + X paise.

After spending 20 paise, he has double the amount he wanted to withdraw. Hence, the equation is

2 * (100X + Y) = 100Y + X - 20

200X + 2Y = 100Y +X - 20

199X - 98Y = -20

98Y - 199X = 20

Now, we got one equation; but there are 2 variables. We have to apply little bit of logic over here. We know that if we interchange X & Y, amount gets double. So Y should be twice of X or one more than twice of X i.e. Y = 2X or Y = 2X+1

Case I : Y=2X

Solving two equations simultaneously

98Y - 199X = 20

Y - 2X = 0

We get X = - 20/3 & Y = - 40/2

Case II : Y=2X+1

Solving two equations simultaneously

98Y - 199X = 20

Y - 2X = 1

We get X = 26 & Y = 53

Now, its obvious that he wanted to withdraw Rs. 26.53