Cody

Solution 1690968

Submitted on 12 Dec 2018
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   Fail
% Last Minute Shopping x = 1;y_correct = 1; assert(isequal(how_many_days(x),y_correct))

Undefined function or variable 'n'. Error in how_many_days (line 2) y = sum(sum(triu(meshgrid(1:n)'))); Error in Test1 (line 3) assert(isequal(how_many_days(x),y_correct))

2   Fail
% You traditionalist you x = 12;y_correct = 364; assert(isequal(how_many_days(x),y_correct))

Undefined function or variable 'n'. Error in how_many_days (line 2) y = sum(sum(triu(meshgrid(1:n)'))); Error in Test2 (line 3) assert(isequal(how_many_days(x),y_correct))

3   Fail
% All of December x = 24;y_correct = 2600; assert(isequal(how_many_days(x),y_correct))

Undefined function or variable 'n'. Error in how_many_days (line 2) y = sum(sum(triu(meshgrid(1:n)'))); Error in Test3 (line 3) assert(isequal(how_many_days(x),y_correct))

4   Fail
% Start on Black Friday this year! x = 32;y_correct = 5984; assert(isequal(how_many_days(x),y_correct))

Undefined function or variable 'n'. Error in how_many_days (line 2) y = sum(sum(triu(meshgrid(1:n)'))); Error in Test4 (line 3) assert(isequal(how_many_days(x),y_correct))

5   Fail
% Halloween? I suppose so... x = 54;y_correct = 27720; assert(isequal(how_many_days(x),y_correct))

Undefined function or variable 'n'. Error in how_many_days (line 2) y = sum(sum(triu(meshgrid(1:n)'))); Error in Test5 (line 3) assert(isequal(how_many_days(x),y_correct))

6   Fail
% July 4?? That's a bit much. x = 174;y_correct = 893200; assert(isequal(how_many_days(x),y_correct))

Undefined function or variable 'n'. Error in how_many_days (line 2) y = sum(sum(triu(meshgrid(1:n)'))); Error in Test6 (line 3) assert(isequal(how_many_days(x),y_correct))

7   Fail
% Only a fool starts Christmas shopping on April 1!! x = 268;y_correct = 3244140; assert(isequal(how_many_days(x),y_correct))

Undefined function or variable 'n'. Error in how_many_days (line 2) y = sum(sum(triu(meshgrid(1:n)'))); Error in Test7 (line 3) assert(isequal(how_many_days(x),y_correct))

8   Fail
% December 26. Because why not? x = 364;y_correct = 8104460; assert(isequal(how_many_days(x),y_correct))

Undefined function or variable 'n'. Error in how_many_days (line 2) y = sum(sum(triu(meshgrid(1:n)'))); Error in Test8 (line 3) assert(isequal(how_many_days(x),y_correct))