Cody

# Problem 45365. Count the days

Solution 2474984

Submitted on 4 Jun 2020
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
assert(isequal(count_days_2([2010:2020],'Fri'),574))

Undefined function 'year' for input arguments of type 'double'. Error in count_days_2 (line 5) while year(s) <= y(end) Error in Test1 (line 1) assert(isequal(count_days_2([2010:2020],'Fri'),574))

2   Fail
assert(isequal(count_days_2([1910:2020],'Sat'),5792))

Undefined function 'year' for input arguments of type 'double'. Error in count_days_2 (line 5) while year(s) <= y(end) Error in Test2 (line 1) assert(isequal(count_days_2([1910:2020],'Sat'),5792))

3   Fail
assert(isequal( count_days_2([1942:1947],'Sun'),313))

Undefined function 'year' for input arguments of type 'double'. Error in count_days_2 (line 5) while year(s) <= y(end) Error in Test3 (line 1) assert(isequal( count_days_2([1942:1947],'Sun'),313))

4   Fail
assert(isequal(count_days_2([1899:1912],'Wed'),730))

Undefined function 'year' for input arguments of type 'double'. Error in count_days_2 (line 5) while year(s) <= y(end) Error in Test4 (line 1) assert(isequal(count_days_2([1899:1912],'Wed'),730))

5   Fail
assert(isequal(count_days_2([1798:1902],'Sun'),5478))

Undefined function 'year' for input arguments of type 'double'. Error in count_days_2 (line 5) while year(s) <= y(end) Error in Test5 (line 1) assert(isequal(count_days_2([1798:1902],'Sun'),5478))

6   Fail
assert(isequal(count_days_2(2012,'Mon'),53))

Undefined function 'year' for input arguments of type 'double'. Error in count_days_2 (line 5) while year(s) <= y(end) Error in Test6 (line 1) assert(isequal(count_days_2(2012,'Mon'),53))