Cody

Solution 2186926

Submitted on 1 Apr 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 = 1; y_correct = 2; assert(isequal(cubesLessSquare(n),y_correct))

y = 1 y = 0

Assertion failed.

2   Fail
n = 2; y_correct = 9; assert(isequal(cubesLessSquare(n),y_correct))

y = 9 y = 0

Assertion failed.

3   Fail
n = 3; y_correct = 24; assert(isequal(cubesLessSquare(n),y_correct))

y = 36 y = 0

Assertion failed.

4   Fail
n = 5; y_correct = 90; assert(isequal(cubesLessSquare(n),y_correct))

y = 225 y = 100

Assertion failed.

5   Fail
n = 10; y_correct = 605; assert(isequal(cubesLessSquare(n),y_correct))

y = 3025 y = 600

Assertion failed.

6   Fail
n = 123; y_correct = 945624; assert(isequal(cubesLessSquare(n),y_correct))

y = 58155876 y = 945600

Assertion failed.

7   Fail
n = 31; y_correct = 15872; assert(isequal(cubesLessSquare(n),y_correct))

y = 246016 y = 15900

Assertion failed.

8   Fail
n = 314; y_correct = 15578325; assert(isequal(cubesLessSquare(n),y_correct))

y = 2.445797025000000e+09 y = 15578300

Assertion failed.

9   Fail
n = 3141; y_correct = 15504233562; assert(isequal(cubesLessSquare(n),y_correct))

y = 2.434939880912100e+13 y = 1.550423360000000e+10

Assertion failed.

10   Fail
n = 31415; y_correct = 15502753617120; assert(isequal(cubesLessSquare(n),y_correct))

y = 2.435095024409212e+17 y = 1.550275361710000e+13

Assertion failed.

11   Fail
n = 314159; y_correct = uint64(15503197751395200); assert(isequal(cubesLessSquare(n),y_correct))

y = 2.435234551190270e+21 y = 1.550319775139510e+16

Assertion failed.

12   Pass
n = 1e5; y_correct = uint64(500010000050000); assert(isequal(cubesLessSquare(n),y_correct))

y = 2.500050000250026e+19 y = 5.000100000500000e+14

13   Fail
n = 123456; y_correct = uint64(940835389047072); assert(isequal(cubesLessSquare(n),y_correct))

y = 5.807588689509781e+19 y = 9.408353890471000e+14

Assertion failed.