Cody

# Problem 45365. Count the days

Solution 2183891

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

Corr = 1×7 cell array {'Sun'} {'Mon'} {'Tue'} {'Thu'} {'Wed'} {'Fri'} {'Sat'} indi = 6 y = 574

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

Corr = 1×7 cell array {'Sun'} {'Mon'} {'Tue'} {'Thu'} {'Wed'} {'Fri'} {'Sat'} indi = 7 y = 5792

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

Corr = 1×7 cell array {'Sun'} {'Mon'} {'Tue'} {'Thu'} {'Wed'} {'Fri'} {'Sat'} indi = 1 y = 313

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

Corr = 1×7 cell array {'Sun'} {'Mon'} {'Tue'} {'Thu'} {'Wed'} {'Fri'} {'Sat'} indi = 5 y = 730

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

Corr = 1×7 cell array {'Sun'} {'Mon'} {'Tue'} {'Thu'} {'Wed'} {'Fri'} {'Sat'} indi = 1 y = 5478

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

ans = 123 Corr = 1×7 cell array {'Sun'} {'Mon'} {'Tue'} {'Thu'} {'Wed'} {'Fri'} {'Sat'} indi = 2 y = 52

Assertion failed.