The first digit of the six digit number 1abcde is 1.
If the first digit is moved to the last place, we get a new number abcde1.
Given that, abcde1:1abcde = 7:2, find the value of abcde.
abcde1/1abcde = 7/2
2 * abcde1 = 7 * 1abcde
lhs ends in 2 so 7*e must end in 2.
Therefore e = 6
2 * abcd61 = 7 * 1abcd6
lhs ends in 22 so 7 * d6 must end in 22
Therefore d=4
2 * abc461 = 7 * 1abc46
lhs ends in 922 so 7 * c46 must end in 922
Therefore c=8
2 * ab8461 = 7 * 1ab846
lhs ends in 6922 so 7 * b846 must end in 6922
Therefore b=3
2 * a38461 = 7 * 1a3846
lhs ends in 76922 so 7 * a3846 must end in 76922
Therefore a=5
abcde is 53846
153846 * 3.5 = 538461
confirmed by a program
----------------------
digits = '0123456789'
for a in digits:
for b in digits:
for c in digits:
for d in digits:
for e in digits:
x = 100000 + int(a+b+c+d+e)
y = 10*int(a+b+c+d+e) +1
if y/x != 3.5:
continue
print(x,y)
|
Posted by Larry
on 2025-03-24 15:50:07 |