Cody

Problem 365. Numbers with prime factors 2, 3 and 5.

Solution 3583860

Submitted on 8 Nov 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
n = 2; A_correct = 2; assert(isequal(your_fcn_name(n),A_correct))

DD = 1 TT = 0.6309 CC = 0.4307 ZZ = 0×1 empty double column vector

Assertion failed.

2   Fail
n = 3; A_correct = [2 3]; assert(isequal(your_fcn_name(n),A_correct))

DD = 1.5850 TT = 1 CC = 0.6826 ZZ = 2

Assertion failed.

3   Fail
n = 4; A_correct = [2 3 4]; assert(isequal(your_fcn_name(n),A_correct))

DD = 2 TT = 1.2619 CC = 0.8614 ZZ = 2 3

Assertion failed.

4   Fail
n = 5; A_correct = [2 3 4 5]; assert(isequal(your_fcn_name(n),A_correct))

DD = 2.3219 TT = 1.4650 CC = 1 ZZ = 2 3 4

Assertion failed.

5   Fail
n = 10; A_correct = [2 3 4 5 6 8 9 10]; assert(isequal(your_fcn_name(n),A_correct))

DD = 3.3219 TT = 2.0959 CC = 1.4307 ZZ = 2 3 4 5 6 8 9

Assertion failed.

6   Pass
n = 17; A_correct = [2 3 4 5 6 8 9 10 12 15 16]; assert(isequal(your_fcn_name(n),A_correct))

DD = 4.0875 TT = 2.5789 CC = 1.7604 ZZ = 2 3 4 5 6 8 9 10 12 15 16

7   Pass
n = 31; A_correct = [2 3 4 5 6 8 9 10 12 15 16 18 20 24 25 27 30]; assert(isequal(your_fcn_name(n),A_correct))

DD = 4.9542 TT = 3.1257 CC = 2.1337 ZZ = 2 3 4 5 6 8 9 10 12 15 16 18 20 24 25 27 30

Suggested Problems

More from this Author2

Community Treasure Hunt

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

Start Hunting!