Problem 15 (Project Euler) [和訳])
Starting in the top left corner of a 2×2 grid, there are 6 routes (without backtracking) to the bottom right corner.
(画像省略)
How many routes are there through a 20×20 grid?
各20個ずつ用意された赤球・白球を一列に並べるときの組み合わせの数と同値です。そのとき、赤球だけに着目すると、40箇所の配置可能な位置の中から20箇所を選ぶことになります。
従って、この場合の数は、40C20となります。
結局、mCnを計算するコードを書けばいいです。