Cody

Problem 1287. Unique dice configurations

Solution 2158599

Submitted on 13 Mar 2020
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Fail
assert(isequal(unique_dice(2,6),21))

Error using unique_dice Too many output arguments. Error in Test1 (line 1) assert(isequal(unique_dice(2,6),21))

2   Fail
assert(isequal(unique_dice(6,8),1716))

Error using unique_dice Too many output arguments. Error in Test2 (line 1) assert(isequal(unique_dice(6,8),1716))

3   Fail
assert(isequal(unique_dice(10,12),352716))

Error using unique_dice Too many output arguments. Error in Test3 (line 1) assert(isequal(unique_dice(10,12),352716))

4   Fail
assert(isequal(unique_dice(20,20),68923264410))

Error using unique_dice Too many output arguments. Error in Test4 (line 1) assert(isequal(unique_dice(20,20),68923264410))

5   Fail
assert(isequal(unique_dice(4,100),4421275))

Error using unique_dice Too many output arguments. Error in Test5 (line 1) assert(isequal(unique_dice(4,100),4421275))

6   Fail
assert(isequal(unique_dice(100,4),176851))

Error using unique_dice Too many output arguments. Error in Test6 (line 1) assert(isequal(unique_dice(100,4),176851))

7   Fail
x=ceil(10000*rand); assert(isequal(unique_dice(1,x),x))

Error using unique_dice Too many output arguments. Error in Test7 (line 2) assert(isequal(unique_dice(1,x),x))