Cody

Problem 45328. leap year

Solution 2803609

Submitted on 6 Aug 2020 by Rafael S.T. Vieira
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
n = 1900:2000; assert(isequal( leap_count(n),25))

2   Pass
n = 100:2000; assert(isequal( leap_count(n),461))

3   Pass
n = 1600:2000; assert(isequal( leap_count(n),98))

4   Pass
n = 3000; assert(isequal( leap_count(n),0))

5   Pass
n = 377:467; assert(isequal( leap_count(n),22))

Suggested Problems

More from this Author149

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!