Cody

Solution 1582667

Submitted on 13 Jul 2018 by J. S. Kowontan
  • Size: 52
  • This is the leading solution.
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))

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

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

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

5   Pass
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)

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)

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)

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)

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)

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)