Cody

Solution 2080518

Submitted on 5 Jan 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
start=1000; finish=1023; y_correct = 1; assert(isequal(diff_digits(start,finish),y_correct))

ans = 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 1 0 1 1 1 0 1 2 3 4 5 6 7 8 0 0 1 2 3 4 5 6 7 8 1 1 0 1

Assertion failed.

2   Fail
start=1000; finish=9999; y_correct = 4536; assert(isequal(diff_digits(start,finish),y_correct))

ans = Columns 1 through 30 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 1 0 1 1 1 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 0 0 1 2 3 4 5 6 7 8 1 1 0 1 2 3 4 5 6 7 Columns 31 through 60 0 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 0 1 2 2 2 2 2 2 2 1 0 1 2 3 3 3 3 3 3 1 0 1 2 3 4 4 4 4 4 2 2 1 0 1 2 3 4 5 6 3 3 2 1 0 1 2 3 4 5 4 4 3 2 1 0 1 2 3 4 Columns 61 through 90 0 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 0 1 2 3 4 5 5 5 5 1 0 1 2 3 4 5 6 6 6 1 0 1 2 3 4 5 6 7 7 5 5 4 3 2 1 0 1 2 3 6 6 5 4 3 2 1 0 1 2 7 7 6 5 4 3 2 1 0 1 Columns 91 through 120 0 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 1 0 1 2 3 4 5 6 7 8 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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2 2 2 2 2 2 2 2 1 0 1 1 1 1 1 1 3 3 2 1 0 0 0 0 0 0 2 2 2 1 0 1 2 3 4 5 1 1 1 1 0 1 2 3 4 5 0 0 0 0 0 1 2 3 4 5 Columns 451 through 480 1 0 1 2 3 3 3 3 3 3 1 0 1 2 3 3 3 3 3 3 1 0 1 2 3 3 3 3 3 3 3 3 2 1 0 1 1 1 1 1 3 3 2 1 0 1 2 2 2 2 3 3 2 1 0 1 2 3 3 3 1 1 1 1 1 0 1 2 3 4 2 2 2 2 2 1 0 1 2 3 3 3 3 3 3 2 1 0 1 2 Columns 481 through 510 1 0 1 2 3 3 3 3 3 3 1 0 1 2 3 3 3 3 3 3 0 1 1 1 1 1 1 1 1 1 3 3 2 1 0 1 2 3 4 4 3 3 2 1 0 1 2 3 4 5 1 0 1 2 3 4 4 4 4 4 4 4 4 4 4 3 2 1 0 1 5 5 5 5 5 4 3 2 1 0 4 4 3 2 1 0 1 2 3 4 Columns 511 through 540 1 0 0 0 0 0 0 0 0 0 1 0 1 1 1 1 1 1 1 1 1 0 1 2 2 2 2 2 2 2 0 0 1 2 3 4 4 4 4 4 1 1 0 1 ...

Assertion failed.

3   Fail
start=1234; finish=5678; y_correct = 2273; assert(isequal(diff_digits(start,finish),y_correct))

ans = Columns 1 through 30 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 0 1 2 2 2 2 2 2 1 1 0 1 2 3 3 3 3 3 1 1 0 1 1 2 3 4 5 6 2 2 2 1 0 1 2 3 4 5 3 3 3 2 1 0 1 2 3 4 4 4 4 3 Columns 31 through 60 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 2 3 4 4 4 4 1 1 0 1 2 3 4 5 5 5 1 1 0 1 2 3 4 5 6 6 1 1 0 1 2 1 0 1 2 3 5 5 5 4 3 2 1 0 1 2 6 6 6 5 4 3 2 1 0 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1 0 5 5 4 3 2 1 0 1 2 3 5 5 4 3 2 1 0 1 2 3 4 4 4 3 Columns 391 through 420 1 1 1 1 1 1 1 0 1 2 2 2 2 2 2 2 1 0 1 2 3 3 3 3 3 3 1 0 1 2 2 3 4 4 4 4 2 2 1 0 1 2 3 3 3 3 3 3 2 1 0 1 2 2 2 2 4 4 3 2 2 1 0 1 2 3 3 3 3 3 2 1 0 1 2 3 2 2 2 2 2 1 0 1 2 3 1 1 1 1 Columns 421 through 450 3 4 4 4 4 4 1 0 1 2 3 4 5 5 5 5 1 0 1 2 3 4 5 5 5 5 1 0 1 2 1 0 1 1 1 1 5 5 4 3 2 1 0 0 0 0 5 5 4 3 2 1 0 1 1 1 5 5 4 3 1 1 0 1 2 3 0 0 0 0 0 0 0 1 2 3 1 1 1 1 1 1 1 0 1 2 2 2 2 2 Columns 451 through 480 3 4 5 5 5 5 1 0 1 2 3 4 5 5 5 5 0 1 1 1 1 1 1 1 1 1 1 0 0 0 2 1 0 1 2 2 5 5 4 3 2 1 0 1 2 3 1 0 1 2 3 4 5 6 6 6 0 0 1 2 2 2 2 1 0 1 3 3 3 3 3 3 3 2 1 0 6 6 5 4 3 2 1 0 1 2 6 6 5 4 Columns 481 through 510 0 0 0 0 0 0 1 0 1 1 1 1 1 1 1 1 1 0 1 2 2 2 2 2 2 2 1 0 1 2 3 4 5 6 6 6 1 1 0 1 2 3 4 5 5 5 2 2 1 0 1 2 3 4 4 4 3 3 2 1 3 2 1 0 1 2 5 5 5 4 3 2 1 0 1 2 4 4 4 4 3 2 1 0 1 2 3 3 3 3 Columns 511 through 540 3 3 3 3 3 3 1 0 1 2 3 4 4 4 4 4 1 0 1 2 3 4 5 5 5 5 1 0 1 2 0 1 2 3 3 3 4 4 3 2 1 0 1 2 ...

Assertion failed.

4   Fail
assert(isequal(diff_digits(4321,6789),1210))

ans = Columns 1 through 30 1 0 1 1 1 1 1 1 1 3 2 1 0 0 0 0 0 0 0 3 2 1 0 1 1 1 1 1 1 3 1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 4 4 2 2 2 1 0 1 2 3 4 4 1 4 4 4 4 3 2 1 0 1 4 4 4 4 4 3 2 1 0 1 4 4 4 4 4 3 2 1 0 1 4 Columns 511 through 540 2 1 0 1 1 1 1 1 1 4 3 2 1 0 0 0 0 0 0 4 3 2 1 0 1 1 1 1 1 4 1 1 1 0 1 2 3 4 4 0 0 0 0 0 ...

Assertion failed.

5   Fail
assert(isequal(diff_digits(1988,2012),0))

ans = 7 7 1 0 1 2 3 4 5 6 7 8 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 8 8 7 6 5 4 3 2 1 0 0 1 2 2 2 2 2 2 2 2 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 2 1 0 1 2 3 4 5 6 7 1 1 0

Assertion failed.