Cody

# Problem 44082. Recycled Numbers (CodeJam Qualification Round 2012)

Solution 1770047

Submitted on 2 Apr 2019 by Abdelfatah Teamah
• Size: 8
• 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
a=1; b=9; y_correct = 0; assert(isequal(recycled_numbers(a,b),y_correct))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In recycled_numbers (line 2) In ScoringEngineTestPoint1 (line 4) In solutionTest (line 3)]

2   Pass
a=10; b=40; y_correct = 3; assert(isequal(recycled_numbers(a,b),y_correct))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In recycled_numbers (line 2) In ScoringEngineTestPoint2 (line 4) In solutionTest (line 5)]

3   Pass
a=1111; b=2222; y_correct = 287 ; %:) assert(isequal(recycled_numbers(a,b),y_correct))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In recycled_numbers (line 2) In ScoringEngineTestPoint3 (line 4) In solutionTest (line 7)]

4   Pass
a=21; b=31; y_correct = 0; assert(isequal(recycled_numbers(a,b),y_correct))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In recycled_numbers (line 2) In ScoringEngineTestPoint4 (line 4) In solutionTest (line 9)]

5   Pass
a=1; b=9; y_correct = 0; assert(isequal(recycled_numbers(a,b),y_correct))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In recycled_numbers (line 2) In ScoringEngineTestPoint5 (line 4) In solutionTest (line 11)]

6   Pass
a=104; b=989; assert(isequal(recycled_numbers(a,b),781))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In recycled_numbers (line 2) In ScoringEngineTestPoint6 (line 3) In solutionTest (line 13)]

7   Pass
a=10; b=99; y = 36; assert(isequal(recycled_numbers(a,b),y))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In recycled_numbers (line 2) In ScoringEngineTestPoint7 (line 4) In solutionTest (line 15)]

8   Pass
assert(isequal(recycled_numbers(100,999),801))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In recycled_numbers (line 2) In ScoringEngineTestPoint8 (line 1) In solutionTest (line 17)]

9   Pass
a=1000; b=9999; y_correct = 12060; assert(isequal(recycled_numbers(a,b),y_correct))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In recycled_numbers (line 2) In ScoringEngineTestPoint9 (line 4) In solutionTest (line 19)]

10   Pass
b=484; a=954; assert(isequal(recycled_numbers(b,a),203))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In recycled_numbers (line 2) In ScoringEngineTestPoint10 (line 3) In solutionTest (line 21)]

11   Pass
a=159887; b=195662; correct = 2058; assert(isequal(recycled_numbers(a,b),correct))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In unix (line 32) In recycled_numbers (line 2) In ScoringEngineTestPoint11 (line 4) In solutionTest (line 23)]