Current location - Training Enrollment Network - Mathematics courses - Mathematical problem: an algorithm for filling boxes with building blocks.
Mathematical problem: an algorithm for filling boxes with building blocks.
I always feel that there is only enumeration. .

There is only one method, 2, 3, 6***.

There are only two kinds, 2, 3: 3, 4: 4, 6: 6, 9:

2、4: 3、6: 4、9: 6、 12:2、 1;

2、6: 3、9: 4、 12:2x3、 1

2、9: 3、 12:2x4、 1;

2、 12:3x6、 1;

Wait a minute. . Each subclass is calculated separately. Since 18 and 12 are even numbers, it is necessary to add two even numbers or two odd numbers. So if it is a combination of 2 and 3, it needs to have an odd even number, only three and only four. . In the same way; In a similar way