This method is generally applicable to binary linear equations, ternary linear equations and quaternary linear equations. For equations with five yuan or more (generally there is no such problem, and it is meaningless to take the exam in school, just those two methods, but it requires higher proficiency and more energy), there are generally ingenious calculation methods, such as rotational symmetry and special numbers.
As for the 26 yuan linear equation you mentioned, it is an indefinite equation, and the number of equations is less than the number of unknowns. Unless otherwise specified, there are generally countless solutions to this equation. This kind of problem can be solved by connecting with knowledge such as function, or it can be enumerated by itself.
If you list 26 yuan's equations in the process of solving the problem, it may be that your method is wrong or the problem is not clear. It is not recommended to hold the equation all the time, which will consume more energy and time. If you encounter such a strange question in the exam, just skip it.
I hope my suggestion can help you, and I hope it will be adopted.