Given inequality $Ax + By \le C$, where $A, B, C$ are integers, $A$ and $B$ are coprime and $C < AB$. I need to find number of non-negative integer solutions of it.
Is there exists algorithm which run in polynomial time?
I've read this question (Count the number of positive solutions for a linear diophantine equation) but given algorithm is not polynomial.
My idea is that the question is connected to Euclid algorithm and Continued fractions.
Can you help with this question giving hints/solution or links to related paper?