Cody

# Problem 2061. Narcissistic number ?

Solution 2758774

Submitted on 30 Jul 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   Pass
x = 1; y_correct = true; assert(isequal(isnarcissistic(x),y_correct))

z = 1 m = 1 h = 0 y = 1

2   Fail
x = 9; y_correct = true; assert(isequal(isnarcissistic(x),y_correct))

z = 9 m = 1 h = 0 y = 0

Assertion failed.

3   Pass
x = 10; y_correct = false; assert(isequal(isnarcissistic(x),y_correct))

z = 1 0 m = 1 h = 0 y = 0

4   Pass
x = 99; y_correct = false; assert(isequal(isnarcissistic(x),y_correct))

z = 9 9 m = 1 h = 0 y = 0

5   Pass
x = 152; y_correct = false; assert(isequal(isnarcissistic(x),y_correct))

z = 1 5 2 m = 1 h = 0 y = 0

6   Fail
x = 153; y_correct = true; assert(isequal(isnarcissistic(x),y_correct))

z = 1 5 3 m = 1 h = 0 y = 0

Assertion failed.

7   Pass
x = 154; y_correct = false; assert(isequal(isnarcissistic(x),y_correct))

z = 1 5 4 m = 1 h = 0 y = 0

8   Fail
x = 371; y_correct = true; assert(isequal(isnarcissistic(x),y_correct))

z = 3 7 1 m = 1 h = 0 y = 0

Assertion failed.

9   Fail
x = 370; y_correct = true; assert(isequal(isnarcissistic(x),y_correct))

z = 3 7 0 m = 1 h = 0 y = 0

Assertion failed.

10   Fail
x = 1634; y_correct = true; assert(isequal(isnarcissistic(x),y_correct))

z = 1 6 3 4 m = 1 h = 0 y = 0

Assertion failed.

11   Pass
x = 8207; y_correct = false; assert(isequal(isnarcissistic(x),y_correct))

z = 8 2 0 7 m = 1 h = 0 y = 0

12   Fail
x = 9474; y_correct = true; assert(isequal(isnarcissistic(x),y_correct))

z = 9 4 7 4 m = 1 h = 0 y = 0

Assertion failed.

13   Fail
x = 9926315; y_correct = true; assert(isequal(isnarcissistic(x),y_correct))

z = 9 9 2 6 3 1 5 m = 1 h = 0 y = 0

Assertion failed.

14   Fail
x = 88593477; y_correct = true; assert(isequal(isnarcissistic(x),y_correct))

z = 8 8 5 9 3 4 7 7 m = 1 h = 0 y = 0

Assertion failed.

15   Fail
x = 9800817; y_correct = true; assert(isequal(isnarcissistic(x),y_correct))

z = 9 8 0 0 8 1 7 m = 1 h = 0 y = 0

Assertion failed.

16   Fail
x = 54748; y_correct = true; assert(isequal(isnarcissistic(x),y_correct))

z = 5 4 7 4 8 m = 1 h = 0 y = 0

Assertion failed.

17   Fail
x = 4679307774; y_correct = true; assert(isequal(isnarcissistic(x),y_correct))

z = 4 6 7 9 3 0 7 7 7 4 m = 1 h = 0 y = 0

Assertion failed.

18   Fail
x = 472335975; y_correct = true; assert(isequal(isnarcissistic(x),y_correct))

z = 4 7 2 3 3 5 9 7 5 m = 1 h = 0 y = 0

Assertion failed.

19   Fail
x = 32164049650; y_correct = true; assert(isequal(isnarcissistic(x),y_correct))

z = 3 2 1 6 4 0 4 9 6 5 0 m = 1 h = 0 y = 0

Assertion failed.

20   Fail
x = 32164049651; y_correct = true; assert(isequal(isnarcissistic(x),y_correct))

z = 3 2 1 6 4 0 4 9 6 5 1 m = 1 h = 0 y = 0

Assertion failed.

21   Pass
x = 32164049652; y_correct = false; assert(isequal(isnarcissistic(x),y_correct))

z = 3 2 1 6 4 0 4 9 6 5 2 m = 1 h = 0 y = 0