Cody

Problem 44082. Recycled Numbers (CodeJam Qualification Round 2012)

Solution 2724225

Submitted on 22 Jul 2020 by Rafael S.T. Vieira
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))

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

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

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

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

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

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

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

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

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

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