1
1
1AzzzA22021-11-28 09:23:25
C++ / C#
1AzzzA2, 2021-11-28 09:23:25

The idea with the selection of all options will not work. Apparently a formula or equivalent is needed. How to decide?

61a3201532cba933749250.png
Here

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
Wataru, 2021-11-28
@1AzzzA2

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 question

Ask a Question

731 491 924 answers to any question