Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Solution 208044

Submitted on 24 Feb 2013 by Alfonso Nieto-Castanon

Correct

16Size
Leading solution size is 16.
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test
Code Input and Output
1
Pass
 
%%
assert(isequal(unique_dice(2,6),21))

                    
2
Pass
 
%%
assert(isequal(unique_dice(6,8),1716))

                    
3
Pass
 
%%
assert(isequal(unique_dice(10,12),352716))

                    
4
Pass
 
%%
assert(isequal(unique_dice(20,20),68923264410))

                    
5
Pass
 
%%
assert(isequal(unique_dice(4,100),4421275))

                    
6
Pass
 
%%
assert(isequal(unique_dice(100,4),176851))

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