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

### Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

# Solution 206669

Submitted on 20 Feb 2013 by James

Correct

96Size
Leading solution size is 45.
`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

```%%
x = 1; y_correct = 6;
assert(isequal(surface_points(x),y_correct))
```

2
Pass

```%%
x = 1024; y_correct = 6;
assert(isequal(surface_points(x),y_correct))
```

3
Pass

```%%
x = 7581; y_correct = 108270;
assert(isequal(surface_points(x),y_correct))
```

4
Pass

```%%
x = 450; y_correct = 2550;
assert(isequal(surface_points(x),y_correct))
```

5
Pass

```%%
x = 123456; y_correct = 19350;
assert(isequal(surface_points(x),y_correct))
```

6
Pass

```%%
x=ceil(rand*8); y_correct=[6 30 30 150 510 4590 4590 43470];
assert(isequal(surface_points(factorial(x+1)),y_correct(x)))
```