Cody

# Problem 42381. Dice roll - lateral faces

Solution 1756892

Submitted on 21 Mar 2019 by Steven Beumer
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
x = 1; y_correct = sum([2 3 4 5]); assert(isequal(dice_roll_lateral_faces(x),y_correct))

y = [] z = 2 3 4 5 y = 2 3 4 5 y = 14

2   Pass
x = 2; y_correct = sum([1 3 4 6]); assert(isequal(dice_roll_lateral_faces(x),y_correct))

y = [] z = 1 3 4 6 y = 1 3 4 6 y = 14

3   Pass
x = 3; y_correct = sum([1 2 5 6]); assert(isequal(dice_roll_lateral_faces(x),y_correct))

y = [] z = 1 2 5 6 y = 1 2 5 6 y = 14

4   Pass
x = 4; y_correct = sum([1 2 5 6]); assert(isequal(dice_roll_lateral_faces(x),y_correct))

y = [] z = 1 2 5 6 y = 1 2 5 6 y = 14

5   Pass
x = 5; y_correct = sum([1 3 4 6]); assert(isequal(dice_roll_lateral_faces(x),y_correct))

y = [] z = 1 3 4 6 y = 1 3 4 6 y = 14

6   Pass
x = 6; y_correct = sum([2 3 4 5]); assert(isequal(dice_roll_lateral_faces(x),y_correct))

y = [] z = 2 3 4 5 y = 2 3 4 5 y = 14

7   Pass
x = [1,3]; y_correct = sum([2 3 4 5 1 2 5 6]); assert(isequal(dice_roll_lateral_faces(x),y_correct))

y = [] z = 2 3 4 5 y = 2 3 4 5 z = 1 2 5 6 y = 2 3 4 5 1 2 5 6 y = 28

8   Pass
x = [4,4]; y_correct = sum([1 2 5 6 1 2 5 6]); assert(isequal(dice_roll_lateral_faces(x),y_correct))

y = [] z = 1 2 5 6 y = 1 2 5 6 z = 1 2 5 6 y = 1 2 5 6 1 2 5 6 y = 28

9   Pass
x = [6,4,3]; y_correct = sum([2 3 4 5 1 2 5 6 1 2 5 6]); assert(isequal(dice_roll_lateral_faces(x),y_correct))

y = [] z = 2 3 4 5 y = 2 3 4 5 z = 1 2 5 6 y = 2 3 4 5 1 2 5 6 z = 1 2 5 6 y = 2 3 4 5 1 2 5 6 1 2 5 6 y = 42

10   Pass
x = [5,5,2]; y_correct = sum([1 3 4 6 1 3 4 6 1 3 4 6]); assert(isequal(dice_roll_lateral_faces(x),y_correct))

y = [] z = 1 3 4 6 y = 1 3 4 6 z = 1 3 4 6 y = 1 3 4 6 1 3 4 6 z = 1 3 4 6 y = 1 3 4 6 1 3 4 6 1 3 4 6 y = 42

11   Pass
x = [3,1,6]; y_correct = sum([1 2 5 6 2 3 4 5 2 3 4 5]); assert(isequal(dice_roll_lateral_faces(x),y_correct))

y = [] z = 1 2 5 6 y = 1 2 5 6 z = 2 3 4 5 y = 1 2 5 6 2 3 4 5 z = 2 3 4 5 y = 1 2 5 6 2 3 4 5 2 3 4 5 y = 42

12   Pass
x = [5,4,3]; y_correct = sum([1 3 4 6 1 2 5 6 1 2 5 6]); assert(isequal(dice_roll_lateral_faces(x),y_correct))

y = [] z = 1 3 4 6 y = 1 3 4 6 z = 1 2 5 6 y = 1 3 4 6 1 2 5 6 z = 1 2 5 6 y = 1 3 4 6 1 2 5 6 1 2 5 6 y = 42

13   Pass
x = [3,1,2,6,1,5]; y_correct = sum([1 2 5 6 2 3 4 5 1 3 4 6 2 3 4 5 2 3 4 5 1 3 4 6]); assert(isequal(dice_roll_lateral_faces(x),y_correct))

y = [] z = 1 2 5 6 y = 1 2 5 6 z = 2 3 4 5 y = 1 2 5 6 2 3 4 5 z = 1 3 4 6 y = 1 2 5 6 2 3 4 5 1 3 4 6 z = 2 3 4 5 y = 1 2 5 6 2 3 4 5 1 3 4 6 2 3 4 5 z = 2 3 4 5 y = 1 2 5 6 2 3 4 5 1 3 4 6 2 3 4 5 2 3 4 5 z = 1 3 4 6 y = 1 2 5 6 2 3 4 5 1 3 4 6 2 3 4 5 2 3 4 5 1 3 4 6 y = 84