Zero-sum counting – codegolf.stackexchange.com

Write a program or function that given n ≥ 1 returns the number of solutions to ±1 ± 2 ± 3 ± … ± n = 0.

For n = 6 there are no solutions, so the answer is 0. For n = 4 there are …

For Get Answer – Click here

Leave a Reply

Your email address will not be published. Required fields are marked *