Mr. Ant and His Problem

Limits: 1s, 512 MB

Mr. Ant has 3 boxes and the infinite number of marbles. Now he wants to know the number of ways he can put marbles in these three boxes when the following conditions hold.


This is a companion discussion topic for the original entry at https://toph.co/p/mr-ant-and-his-problem