A person forgot his 5 digit pin code, but he remembers some hints. 1. 1st digit is square of 2nd digit. 2. Sum of 2nd and 3rd digit makes 10. 3. 4th digit is 2nd digit + 1. 4. Sum of 5th and 3rd digit makes 14. 5. Sum of all 5 digits = 30. Tell the pin code.

Question
A person forgot his 5 digit pin code, but he remembers some hints.
1. 1st digit is square of 2nd digit.
2. Sum of 2nd and 3rd digit makes 10.
3. 4th digit is 2nd digit + 1.
4. Sum of 5th and 3rd digit makes 14.
5. Sum of all 5 digits = 30.
Tell the pin code.

Answer
Let the pin code be of the form abcde, where a,b,c,d and e are the digits of the pin code. So,

a = b^2.....................(1)
b + c = 10...................(2)
d = b + 1.....................(3)
e + c = 14...................(4)
a + b + c + d + e = 30.......(5)

Now, let us rearrange the terms on the L.H.S of Equation (5) :
a + b + (e + c) + d = 30
So, from Equations (1), (3) and (4) :
b^2 + b + 14 + (b + 1) = 30
b^2 + 2b + 1 = 16
(b+1)^2 = 4^2
b + 1 = 4 (As b is a digit, b + 1 cannot be equal to -4)
b = 3
Once we get b=3 :
From Equation (1) : a = 9
From Equation (2) : c = 7
From Equation (3) : d = 4
From Equation (4) : e = 7

So, the required pin code is 93747.

Comments