Cody

Problem 45388. Gapful numbers

Solution 3185356

Submitted on 13 Oct 2020 by A. K. M. Rakib
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(gapful_4(54),0))

2   Pass
assert(isequal(gapful_4(451),51))

3   Pass
assert(isequal(gapful_4(4451),525))

4   Pass
assert(isequal(gapful_4(10000),765))

5   Pass
assert(isequal(gapful_4(100000),7491))

6   Pass
assert(isequal(gapful_4(99999),7490))

7   Pass
assert(isequal(gapful_4(1000000),74665))

8   Pass
%assert(isequal(gapful_4(1200000),117829))

9   Pass
%assert(isequal(gapful_4(10000000),746,286))

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!