V
V
vadimkenny2021-09-30 19:37:53
C++ / C#
vadimkenny, 2021-09-30 19:37:53

How to solve a problem in C++ for algorithms?

Natural numbers a and b are given (a<=b ). Write a program to print all numbers from a to b whose squares are equal to their binomial coefficient. Those. k^2+n^2=n!/(k!(nk)!).

It seems easy, I just don't understand what k^2+n^2=n!/(k!(nk)!) means and where to get it from the square of a number.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
Wataru, 2021-09-30
@vadimkenny

Apparently, we need to print all pairs n and k such that k^2+n^2=n!/(k!(nk)!), a <= k <= n <= b.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question