Cody

# Problem 174. Roll the Dice!

Solution 2586400

Submitted on 20 Jun 2020 by Piero Cimule
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)

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