Ad
  • Custom User Avatar

    Usually problems are related to overflow, and you can verify this by comparing your results to, for example, results returned by Wolfram: https://www.wolframalpha.com/input/?i=binomial%2860%2C30%29 .
    Run your solution locally for n=60, dump the answer to the console, and check numbers in the middle of the row, because these are the largest: (59 28), (60 30) etc.

    It's possible that your calculations either overflow, or are inaccurate due to floating point division.