Cody

# Problem 42377. Bouncy numbers

Solution 2074519

Submitted on 30 Dec 2019
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
x = 0.01; y_correct = 102; assert(isequal(bouncy_numbers(x),y_correct))

b = 1 a = 101

Operands to the || and && operators must be convertible to logical scalar values. Error in bouncy_numbers (line 7) while b / a <= x && a < 110 Error in Test1 (line 3) assert(isequal(bouncy_numbers(x),y_correct))

2   Fail
x = 0.05; y_correct = 106; assert(isequal(bouncy_numbers(x),y_correct))

b = 2 a = 102

Operands to the || and && operators must be convertible to logical scalar values. Error in bouncy_numbers (line 7) while b / a <= x && a < 110 Error in Test2 (line 3) assert(isequal(bouncy_numbers(x),y_correct))

3   Fail
x = 0.1; y_correct = 132; assert(isequal(bouncy_numbers(x),y_correct))

b = 3 a = 103

Operands to the || and && operators must be convertible to logical scalar values. Error in bouncy_numbers (line 7) while b / a <= x && a < 110 Error in Test3 (line 3) assert(isequal(bouncy_numbers(x),y_correct))

4   Fail
x = 0.2; y_correct = 175; assert(isequal(bouncy_numbers(x),y_correct))

b = 4 a = 104

Operands to the || and && operators must be convertible to logical scalar values. Error in bouncy_numbers (line 7) while b / a <= x && a < 110 Error in Test4 (line 3) assert(isequal(bouncy_numbers(x),y_correct))

5   Fail
x = 0.5; y_correct = 538; assert(isequal(bouncy_numbers(x),y_correct))

b = 5 a = 105

Operands to the || and && operators must be convertible to logical scalar values. Error in bouncy_numbers (line 7) while b / a <= x && a < 110 Error in Test5 (line 3) assert(isequal(bouncy_numbers(x),y_correct))

6   Fail
x = 0.8; y_correct = 4770; assert(isequal(bouncy_numbers(x),y_correct))

b = 6 a = 106

Operands to the || and && operators must be convertible to logical scalar values. Error in bouncy_numbers (line 7) while b / a <= x && a < 110 Error in Test6 (line 3) assert(isequal(bouncy_numbers(x),y_correct))

7   Fail
x = 0.9; y_correct = 21780; assert(isequal(bouncy_numbers(x),y_correct))

b = 7 a = 107

Operands to the || and && operators must be convertible to logical scalar values. Error in bouncy_numbers (line 7) while b / a <= x && a < 110 Error in Test7 (line 3) assert(isequal(bouncy_numbers(x),y_correct))

8   Fail
x = 0.95; y_correct = 63720; assert(isequal(bouncy_numbers(x),y_correct))

b = 8 a = 108

Operands to the || and && operators must be convertible to logical scalar values. Error in bouncy_numbers (line 7) while b / a <= x && a < 110 Error in Test8 (line 3) assert(isequal(bouncy_numbers(x),y_correct))

9   Fail
x = 0.96; y_correct = 152975; assert(isequal(bouncy_numbers(x),y_correct))

b = 9 a = 109

Operands to the || and && operators must be convertible to logical scalar values. Error in bouncy_numbers (line 7) while b / a <= x && a < 110 Error in Test9 (line 3) assert(isequal(bouncy_numbers(x),y_correct))

10   Fail
x = 0.97; y_correct = 208200; assert(isequal(bouncy_numbers(x),y_correct))

Operands to the || and && operators must be convertible to logical scalar values. Error in bouncy_numbers (line 7) while b / a <= x && a < 110 Error in Test10 (line 3) assert(isequal(bouncy_numbers(x),y_correct))

11   Fail
x = 0.98; y_correct = 377650; assert(isequal(bouncy_numbers(x),y_correct))

Assertion failed.