Cody

# Problem 1443. Edges of a n-dimensional Hypercube

Solution 1675792

Submitted on 18 Nov 2018 by Martin C.
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
user_solution = fileread('hypercube_edges.m'); assert(isempty(strfind(user_solution,'regexp'))); assert(isempty(strfind(user_solution,'2str'))); assert(isempty(strfind(user_solution,'str2'))); assert(isempty(strfind(user_solution,'interp'))); assert(isempty(strfind(user_solution,'printf'))); assert(isempty(strfind(user_solution,'assert')));

2   Pass
n = 0; E_correct = 0; assert(isequal(hypercube_edges(n),E_correct))

E = 0

3   Pass
n = 1; E_correct = 1; assert(isequal(hypercube_edges(n),E_correct))

E = 1

4   Pass
n = 2; E_correct = 4; assert(isequal(hypercube_edges(n),E_correct))

E = 4

5   Pass
n = 3; E_correct = 12; assert(isequal(hypercube_edges(n),E_correct))

E = 12

6   Pass
n = 4; E_correct = 32; assert(isequal(hypercube_edges(n),E_correct))

E = 32

7   Pass
n = 5; E_correct = 80; assert(isequal(hypercube_edges(n),E_correct))

E = 80

8   Pass
n = 6; E_correct = 192; assert(isequal(hypercube_edges(n),E_correct))

E = 192

9   Pass
n = 7; E_correct = 448; assert(isequal(hypercube_edges(n),E_correct))

E = 448

10   Pass
n = 8; E_correct = 1024; assert(isequal(hypercube_edges(n),E_correct))

E = 1024

11   Pass
n = 9; E_correct = 2304; assert(isequal(hypercube_edges(n),E_correct))

E = 2304

12   Pass
n = 10; E_correct = 5120; assert(isequal(hypercube_edges(n),E_correct))

E = 5120

13   Pass
n = 11; E_correct = 11264; assert(isequal(hypercube_edges(n),E_correct))

E = 11264

14   Pass
n = 12; E_correct = 24576; assert(isequal(hypercube_edges(n),E_correct))

E = 24576

15   Pass
n = 13; E_correct = 53248; assert(isequal(hypercube_edges(n),E_correct))

E = 53248

16   Pass
n = 14; E_correct = 114688; assert(isequal(hypercube_edges(n),E_correct))

E = 114688

17   Pass
n = 15; E_correct = 245760; assert(isequal(hypercube_edges(n),E_correct))

E = 245760