Cody

Solution 239082

Submitted on 2 May 2013
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))
3   Fail
%% n = 1; E_correct = 1; assert(isequal(hypercube_edges(n),E_correct))
Error: Assertion failed.
4   Fail
%% n = 2; E_correct = 4; assert(isequal(hypercube_edges(n),E_correct))
Error: Assertion failed.
5   Fail
%% n = 3; E_correct = 12; assert(isequal(hypercube_edges(n),E_correct))
Error: Assertion failed.
6   Fail
%% n = 4; E_correct = 32; assert(isequal(hypercube_edges(n),E_correct))
Error: Assertion failed.
7   Fail
%% n = 5; E_correct = 80; assert(isequal(hypercube_edges(n),E_correct))
Error: Assertion failed.
8   Fail
%% n = 6; E_correct = 192; assert(isequal(hypercube_edges(n),E_correct))
Error: Assertion failed.
9   Fail
%% n = 7; E_correct = 448; assert(isequal(hypercube_edges(n),E_correct))
Error: Assertion failed.
10   Fail
%% n = 8; E_correct = 1024; assert(isequal(hypercube_edges(n),E_correct))
Error: Assertion failed.
11   Fail
%% n = 9; E_correct = 2304; assert(isequal(hypercube_edges(n),E_correct))
Error: Assertion failed.
12   Fail
%% n = 10; E_correct = 5120; assert(isequal(hypercube_edges(n),E_correct))
Error: Assertion failed.
13   Fail
%% n = 11; E_correct = 11264; assert(isequal(hypercube_edges(n),E_correct))
Error: Assertion failed.
14   Fail
%% n = 12; E_correct = 24576; assert(isequal(hypercube_edges(n),E_correct))
Error: Assertion failed.
15   Fail
%% n = 13; E_correct = 53248; assert(isequal(hypercube_edges(n),E_correct))
Error: Assertion failed.
16   Fail
%% n = 14; E_correct = 114688; assert(isequal(hypercube_edges(n),E_correct))
Error: Assertion failed.
17   Fail
%% n = 15; E_correct = 245760; assert(isequal(hypercube_edges(n),E_correct))
Error: Assertion failed.