Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Iterate over a and b. Then see what values c can take so that the constraints are met. This will be a segment of numbers. They do not need to be sorted out - you can immediately calculate them all. For example, if you see that c<=10 satisfies the constraints, then there are ten triples with the current a, b.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question