10A+9B+7C+3D+5E=229 and a,b,c,d,e can be whole numbers 1-10, How many Solutions?

#1
If 10A+9B+7C+3D+5E=229 and a,b,c,d,e can be a whole numbers 1-10

How many possible solutions are there?

***I was thinking to break down into prime factors but this doesn't help as the numbers are added together. Thanks for the help!
 

katxt

Active Member
#2
This is almost certainly done most quickly by writing a brute force program with 5 loops. 3 min for program, 2 sec for solution.
 

katxt

Active Member
#4
582 I assume you have Excel. Google how to get the developer tab up and create a macro, type or copy, then run it.
Sub count()
sol = 0
For a = 1 To 10: For b = 1 To 10: For c = 1 To 10: For d = 1 To 10: For e = 1 To 10
If 10 * a + 9 * b + 7 * c + 3 * d + 5 * e = 229 Then sol = sol + 1
Next: Next: Next: Next: Next
Range("a1") = sol
End Sub