Cody

# Problem 174. Roll the Dice!

Solution 1910795

Submitted on 24 Aug 2019 by Reza Dodge
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   Pass
x1 = zeros(1,6000); x2 = zeros(1,6000); for ii = 1:6000 [x1(ii),x2(ii)] = rollDice(); end numCt = sum( bsxfun( @eq, x1, (1:6)' ), 2 ) + sum( bsxfun( @eq, x2, (1:6)' ), 2 ); assert(all(round(numCt/200) == 10) && sum(numCt) == 12000)

roll = 3 4 roll = 2 3 roll = 4 6 roll = 5 2 roll = 3 6 roll = 2 3 roll = 1 4 roll = 3 4 roll = 4 1 roll = 5 2 roll = 2 4 roll = 6 4 roll = 6 6 roll = 5 1 roll = 1 1 roll = 3 3 roll = 2 3 roll = 3 4 roll = 3 6 roll = 2 2 roll = 5 3 roll = 5 3 roll = 4 3 roll = 4 5 roll = 2 2 roll = 2 3 roll = 2 6 roll = 6 2 roll = 1 3 roll = 5 3 roll = 1 1 roll = 5 1 roll = 5 1 roll = 5 5 roll = 2 3 roll = 1 6 roll = 2 5 roll = 5 6 roll = 6 2 roll = 1 6 roll = 4 6 roll = 1 5 roll = 3 6 roll = 2 6 roll = 2 6 roll = 6 1 roll = 6 2 roll = 4 3 roll = 1 3 roll = 1 4 roll = 6 2 roll = 6 4 roll = 5 2 roll = 4 1 roll = 2 1 roll = 3 6 roll = 4 5 roll = 6 3 roll = 4 4 roll = 6 5 roll = 4 1 roll = 1 3 roll = 1 1 roll = 1 2 roll = 4 6 roll = 4 6 roll = 3 1 roll = 1 2 roll = 4 3 roll = 1 3 roll = 4 4 roll = 4 6 roll = 6 3 roll = 3 5 roll = 6 1 roll = 2 2 roll = 4 3 roll = 3 2 roll = 5 1 roll = 2 5 roll = 1 1 roll = 5 4 roll = 1 4 roll = 5 4 roll = 3 3 roll = 2 6 roll = 6 3 roll = 2 5 roll = 1 1 roll = 5 4 roll = 4 3 roll = 1 1 roll = 3 2 roll = 6 1 roll = 3 6 roll = 2 3 roll = 4 1 roll = 3 3 roll = 5 2 roll = 5 3 roll = 2 5 roll = 2 3 roll = 5 3 roll = 6 1 roll = 5 1 roll = 1 5 roll = 2 5 roll = 6 4 roll = 4 2 roll = 2 2 roll = 4 3 roll = 5 4 roll = 4 4 roll = 3 6 roll = 1 2 roll = 6 1 roll = 6 4 roll = 1 5 roll = 5 3 roll = 5 6 roll = 2 5 roll = 3 6 roll = 5 6 roll = 6 6 roll = 5 3 roll = 4 3 roll = 6 1 roll = 4 1 roll = 5 3 roll = 1 6 roll = 3 1 roll = 1 1 roll = 4 5 roll = 4 4 roll = 1 2 roll = 2 6 roll = 6 5 roll = 5 6 roll = 4 1 roll = 1 6 roll = 3 2 roll = 2 2 roll = 1 2 roll = 3 3 roll = 1 2 roll = 5 1 roll = 6 2 roll = 1 3 roll = 4 4 roll = 5 3 roll = 6 5 roll = 2 1 roll = 6 3 roll = 5 1 roll = 3 3 roll = 3 1 roll = 1 5 roll = 4 4 roll = 3 2 roll = 4 6 roll = 4 5 roll = 3 2 roll = 5 3 roll = 4 4 roll = 4 6 roll = 1 5 roll = 4 4 roll = 4 1 roll = 5 3 roll = 3 1 roll = 2 2 roll = 4 2 roll = 1 2 roll = 4 4 roll = 2 3 roll = 4 5 roll = 1 6 roll = 6 3 roll = 1 5 roll = 5 1 roll = 4 2 roll = 2 5 roll = 4 3 roll = 4 5 roll = 1 1 roll = 5 5 roll = 4 1 roll = 6 1 roll = 6 1 roll = 2 6 roll = 1 4 roll = 5 2 roll = 3 3 roll = 5 1 roll = 4 6 roll = 6 2 roll = 5 3 roll = 5 6 roll = 6 6 roll = 4 2 roll = 1 2 roll = 2 5 roll = 1 4 roll = 4 6 roll = 4 5 roll = 6 6 roll = 4 6 roll = 5 4 roll = 6 2 roll = 6 6 roll = 4 2 roll = 2 3 roll = 5 5 roll = 3 1 roll = 3 1 roll = 2 5 roll = 2 2 roll = 4 1 roll = 1 6 roll = 4 5 roll = 2 3 roll = 6 6 roll = 6 3 roll = 3 2 roll = 5 3 roll = 5 2 roll = 4 5 roll = 6 5 roll = 5 5 roll = 1 5 roll = 4 1 roll = 4 5 roll = 2 3 roll = 5 6 roll = 3 3 roll = 5 5 roll = 2 6 roll = 4 3 roll = 2 2 roll = 2 5 roll = 2 2 roll = 3 4 roll = 6 5 roll = 6 1 roll = 5 1 roll = 4 2 roll = 2 4 roll = 4 3 roll = 2 2 roll = 6 3 roll = 1 3 roll = 5 1 roll = 2 2 roll = 3 1 roll = 5 3 roll = 5 4 roll = 5 1 roll = 3 2 roll = 1 3 roll = 6 3 roll = 1 2 roll = 5 4 roll = 4 2 roll = 2 6 roll = 3 1 roll = 5 1 roll = 6 3 roll = 4 6 roll = 5 5 roll = 4 6 roll = 5 6 roll = 1 3 roll = 1 6 roll = 3 3 roll = 3 5 roll = 4 3 roll = 1 6 roll = 4 1 roll = 6 2 roll = 1 1 roll = 5 1 roll = 5 1 roll = 1 6 roll = 2 3 roll = 4 5 roll = 3 3 roll = 3 3 roll = 4 4 roll = 4 3 roll = 5 3 roll = 3 1 roll = 4 6 roll = 4 5 roll = 6 3 roll = 5 2 roll = 5 1 roll = 2 5 roll = 4 3 roll = 5 4 roll = 1 1 roll = 1 1 roll = 1 3 roll = 2 6 roll = 6 6 roll = 5 5 roll = 5 3 roll = 2 2 roll = 4 3 roll = 3 4 roll = 3 3 roll = 6 6 roll = 4 1 roll = 3 2 roll = 6 6 roll = 4 2 roll = 3 3 roll = 3 3 roll = 4 3 roll = 4 3 roll = 2 5 roll = 4 3 roll = 6 6 roll = 4 3 roll = 3 4 roll = 4 6 roll = 3 2 roll = 2 3 roll = 6 6 roll = 1 4 roll = 1 1 roll = 6 1 roll = 5 5 roll = 3 2 roll = 2 6 roll = 5 2 roll = 2 5 roll = 4 1 roll = 2 2 roll = 5 6 roll = 1 6 roll = 6 6 roll = 2 2 roll = 6 4 roll = 4 6 roll = 2 6 roll = 6 5 roll = 1 4 roll = 3 3 roll = 6 2 roll = 6 4 roll = 5 3 roll = 2 1 roll = 1 3 roll = 2 3 roll = 5 5 roll = 1 3 roll = 6 1 roll = 4 4 roll = 5 6 roll = 3 2 roll = 5 6 roll = 2 1 roll = 3 6 roll = 5 3 roll = 2 3 roll = 3 4 roll = 2 1 roll = 5 4 roll = 1 4 roll = 1 4 roll = 1 6 roll = 4 4 roll = 4 2 roll = 5 1 roll = 1 2 roll = 5 2 roll = 4 4 roll = 4 6 roll = 3 4 roll = 6 3 roll = 4 4 roll = 4 3 roll = 2 5 roll = 1 4 roll = 6 3 roll = 2 1 roll = 4 3 roll = 4 2 roll = 2 3 roll = 4 4 roll = 3 4 roll = 6 6 roll = 6 4 roll = 3 3 roll = 4 2 roll = 1 6 roll = 6 6 roll = 3 4 roll = 1 2 roll = 1 1 roll = 1 6 roll = 5 1 roll = 4 6 roll = 6 3 roll = 6 6 roll = 1 4 roll = 5 3 roll = 5 1 roll = 3 2 roll = 6 4 roll = 5 6 roll = 6 6 roll = 2 3 roll = 6 2 roll = 4 1 roll = 3 5 roll = 6 4 roll = 1 1 roll = 1 6 roll = 6 2 roll = 4 6 roll = 1 4 roll = 2 4 roll = 1 3 roll = 1 2 roll = 5 2 roll = 5 4 roll = 2 1 roll = 6 5 roll = 3 6 roll = 5 1 roll = 3 1 roll = 2 2 roll = 4 6 roll = 6 ...