i have a simple equation of two variables say x and y such that x + y < 10^5 (this is a sort of constraint that i must obey). x and y can take only integer values.

now all i want to do is to maximise the equation consisting of these two variables x and y.

SO I have an equation like :

Ax + By (which i want to maxmise)

with constraints : x + y <= 10^5

where x,y can take only integer values

I googled a bit and this seems to be the case of integer linear programming which they say that is easier as compared to linear programming.

I am not able to figure out the algorithm that i need to know to maximise the equation efficiently. A simple brute force is not at all desirable to me, so I need something cool.

can you help me in figuring out the algorithm that i need to learn.(a brief explanation would be appreciated)