$\frac{abc-defc+fagh-iafg}{6}=337$
The string of letters are numbers so when the equation had $fagh$ it represents $1000f+100a+10g+h.$ Try to find the maximum of $iafg.$ Good luck!
$\frac{abc-defc+fagh-iafg}{6}=337$
The string of letters are numbers so when the equation had $fagh$ it represents $1000f+100a+10g+h.$ Try to find the maximum of $iafg.$ Good luck!
Copyright © 2021 JogjaFile Inc.
I'll answer this because it doesn't take too long and I think the technique is worth seeing. This and similar problems can be slaughtered with integer programming, which is implemented in sage, for instance.
Given linear constraints, we can efficiently maximize a linear target function. If we add bonus constraints that some variables should only be allowed integer values, then the worst case difficulty skyrockets, but many problems (particularly those as small as this) can still be quickly solved in practice.
As an example, here's the sage code for this particular problem, which I think is self explanatory. It solves the problem in roughly $4$ milliseconds.
Since you've listed this as a problem for us to solve, rather than something you want help with, I'll leave the output of
p.solve()under a fold.I hope this helps ^_^