Cody

Solution 1703947

Submitted on 7 Jan 2019 by bainhome
  • Size: 30
  • 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.

This solution is outdated. To rescore this solution, sign in.

Test Suite

Test Status Code Input and Output
1   Pass
x =[ 3 2 2 3 6 9 8 4]; dif_correct =76308633; assert(isequal(difference(x),dif_correct))

2   Pass
x =[ 3 2 2 0 0 4]; dif_correct =429966; assert(isequal(difference(x),dif_correct))

3   Pass
x =[1 1 1]; dif_correct =429966; assert(isequal(difference(x),dif_correct))

4   Pass
x =[1 2 3 3 2 1]; dif_correct = 219978; assert(isequal(difference(x),dif_correct))