I am a 2 digit number less than 50. If you put me in groups of 5, then there are 2 left over. The sum of my digits is 6. Who am I?
Here's a "mathematical" solution......let the digits of the number be a and b, in that order.....and we have
[10a + b] mod 5 = 2 (1) and a + b = 6 (2)
Manipulating (2), we have
b = 6 - a
Subbing this into (1), we have
[10a + 6 - a] mod 5 = 2
[9a + 6] mod 5 = 2 (3)
(9a mod 5 + 6 mod 5 ) = 2
9a mod 5 + 1 = 2 subtract 1 from both sides
9a mod 5 = 1 and, since our number is < 50....the only multiple of 9 that results in a remainder of 1 when divded by 5 on [ 0, 50) is when a = 4, i.e., 9a = 36
And using (3),
[ 9(4) + 6] mod 5 = 2
42 mod 5 = 2
And our number is 42....
![]()