Reason:
We number this ball 1, 2 ... We know that taking out 1, 2 and 2, 1 are the same.
For example, c( 16) takes the number 1, and then c( 1 12) takes the number 2.
While c( 16) takes No.2, and c( 1 12) takes No.0 1.
In fact, it is a situation, but your algorithm divides them into two types.
So, divide by 2.
However, it is recommended to use case discussion, which is not easy to make mistakes.