Cody

Solution 2638903

Submitted on 1 Jul 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
n = 100; [a b c] = numcons(n); assert(all([a b c]==0))

m = [] a = 0 b = 0 c = 0

2   Pass
n = 888; [a b c] = numcons(n); assert(all([a b c]==0))

m = [] a = 0 b = 0 c = 0

3   Pass
n = 19666; [a b c] = numcons(n); assert(all([a b c]==0))

m = [] a = 0 b = 0 c = 0

4   Pass
n = 314159; [a b c] = numcons(n); assert(all([a b c]==0))

m = [] a = 0 b = 0 c = 0

5   Fail
n = 1100; [a b c] = numcons(n); assert(all(mod([a b c],1)==0)) assert(all([a b c]>1)) assert(a^1.5+b^2.5+c^3.5==n)

Output argument "a" (and maybe others) not assigned during call to "numcons". Error in Test5 (line 2) [a b c] = numcons(n);

6   Pass
n = 116600; [a b c] = numcons(n); assert(all(mod([a b c],1)==0)) assert(all([a b c]>1)) assert(a^1.5+b^2.5+c^3.5==n)

m = [] s = 36 100 16 a = 36 b = 100 c = 16

7   Pass
n = 16999; [a b c] = numcons(n); assert(all(mod([a b c],1)==0)) assert(all([a b c]>1)) assert(a^1.5+b^2.5+c^3.5==n)

m = [] s = 16 49 4 a = 16 b = 49 c = 4

8   Pass
n = 10000040; [a b c] = numcons(n); assert(all(mod([a b c],1)==0)) assert(all([a b c]>1)) assert(a^1.5+b^2.5+c^3.5==n)

m = [] s = 4 4 100 a = 4 b = 4 c = 100

9   Pass
n = 94940; [a b c] = numcons(n); assert(all(mod([a b c],1)==0)) assert(all([a b c]>1)) assert(a^1.5+b^2.5+c^3.5==n)

m = [] s = 4 49 25 a = 4 b = 49 c = 25

10   Pass
n = 9990; [a b c] = numcons(n); assert(all(mod([a b c],1)==0)) assert(all([a b c]>1)) assert(a^1.5+b^2.5+c^3.5==n)

m = [] s = 9 36 9 a = 9 b = 36 c = 9