Cody

# Problem 166. Kaprekar numbers

Solution 2872304

Submitted on 24 Aug 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
x = 16; tf_correct = false; assert(isequal(kap(x),tf_correct))

Error in solution: Line: 15 Column: 12 Incorrect use of '=' operator. To assign a value to a variable, use '='. To compare values for equality, use '=='.

2   Fail
x = 704; tf_correct = false; assert(isequal(kap(x),tf_correct))

Error in solution: Line: 15 Column: 12 Incorrect use of '=' operator. To assign a value to a variable, use '='. To compare values for equality, use '=='.

3   Fail
x = 9 tf_correct = true assert(isequal(kap(x),tf_correct))

Error in solution: Line: 15 Column: 12 Incorrect use of '=' operator. To assign a value to a variable, use '='. To compare values for equality, use '=='.

4   Fail
x = 45 tf_correct = true assert(isequal(kap(x),tf_correct))

Error in solution: Line: 15 Column: 12 Incorrect use of '=' operator. To assign a value to a variable, use '='. To compare values for equality, use '=='.

5   Fail
x = 55 tf_correct = true assert(isequal(kap(x),tf_correct))

Error in solution: Line: 15 Column: 12 Incorrect use of '=' operator. To assign a value to a variable, use '='. To compare values for equality, use '=='.

6   Fail
x = 99 tf_correct = true assert(isequal(kap(x),tf_correct))

Error in solution: Line: 15 Column: 12 Incorrect use of '=' operator. To assign a value to a variable, use '='. To compare values for equality, use '=='.

7   Fail
x = 297 tf_correct = true assert(isequal(kap(x),tf_correct))

Error in solution: Line: 15 Column: 12 Incorrect use of '=' operator. To assign a value to a variable, use '='. To compare values for equality, use '=='.

8   Fail
x = 703 tf_correct = true assert(isequal(kap(x),tf_correct))

Error in solution: Line: 15 Column: 12 Incorrect use of '=' operator. To assign a value to a variable, use '='. To compare values for equality, use '=='.

9   Fail
x = 999 tf_correct = true assert(isequal(kap(x),tf_correct))

Error in solution: Line: 15 Column: 12 Incorrect use of '=' operator. To assign a value to a variable, use '='. To compare values for equality, use '=='.

10   Fail
x = 2223 tf_correct = true assert(isequal(kap(x),tf_correct))

Error in solution: Line: 15 Column: 12 Incorrect use of '=' operator. To assign a value to a variable, use '='. To compare values for equality, use '=='.

11   Fail
x = 2728 tf_correct = true assert(isequal(kap(x),tf_correct))

Error in solution: Line: 15 Column: 12 Incorrect use of '=' operator. To assign a value to a variable, use '='. To compare values for equality, use '=='.

12   Fail
x = 4950 tf_correct = true assert(isequal(kap(x),tf_correct))

Error in solution: Line: 15 Column: 12 Incorrect use of '=' operator. To assign a value to a variable, use '='. To compare values for equality, use '=='.

13   Fail
x = 5050 tf_correct = true assert(isequal(kap(x),tf_correct))

Error in solution: Line: 15 Column: 12 Incorrect use of '=' operator. To assign a value to a variable, use '='. To compare values for equality, use '=='.

14   Fail
x = 7272 tf_correct = true assert(isequal(kap(x),tf_correct))

Error in solution: Line: 15 Column: 12 Incorrect use of '=' operator. To assign a value to a variable, use '='. To compare values for equality, use '=='.

15   Fail
x = 7777 tf_correct = true assert(isequal(kap(x),tf_correct))

Error in solution: Line: 15 Column: 12 Incorrect use of '=' operator. To assign a value to a variable, use '='. To compare values for equality, use '=='.

16   Fail
x = 9999 tf_correct = true assert(isequal(kap(x),tf_correct))

Error in solution: Line: 15 Column: 12 Incorrect use of '=' operator. To assign a value to a variable, use '='. To compare values for equality, use '=='.

17   Fail
x = 17344 tf_correct = true assert(isequal(kap(x),tf_correct))

Error in solution: Line: 15 Column: 12 Incorrect use of '=' operator. To assign a value to a variable, use '='. To compare values for equality, use '=='.

18   Fail
x = 22222 tf_correct = true assert(isequal(kap(x),tf_correct))

Error in solution: Line: 15 Column: 12 Incorrect use of '=' operator. To assign a value to a variable, use '='. To compare values for equality, use '=='.

19   Fail
x = 77778 tf_correct = true assert(isequal(kap(x),tf_correct))

Error in solution: Line: 15 Column: 12 Incorrect use of '=' operator. To assign a value to a variable, use '='. To compare values for equality, use '=='.

20   Fail
x = 82656 tf_correct = true assert(isequal(kap(x),tf_correct))

Error in solution: Line: 15 Column: 12 Incorrect use of '=' operator. To assign a value to a variable, use '='. To compare values for equality, use '=='.

21   Fail
x = 95121 tf_correct = true assert(isequal(kap(x),tf_correct))

Error in solution: Line: 15 Column: 12 Incorrect use of '=' operator. To assign a value to a variable, use '='. To compare values for equality, use '=='.

22   Fail
x = 99999 tf_correct = true assert(isequal(kap(x),tf_correct))

Error in solution: Line: 15 Column: 12 Incorrect use of '=' operator. To assign a value to a variable, use '='. To compare values for equality, use '=='.

23   Fail
x = 142857 tf_correct = true assert(isequal(kap(x),tf_correct))

Error in solution: Line: 15 Column: 12 Incorrect use of '=' operator. To assign a value to a variable, use '='. To compare values for equality, use '=='.

24   Fail
x = 148149 tf_correct = true assert(isequal(kap(x),tf_correct))

Error in solution: Line: 15 Column: 12 Incorrect use of '=' operator. To assign a value to a variable, use '='. To compare values for equality, use '=='.

25   Fail
x = 181819 tf_correct = true assert(isequal(kap(x),tf_correct))

Error in solution: Line: 15 Column: 12 Incorrect use of '=' operator. To assign a value to a variable, use '='. To compare values for equality, use '=='.

26   Fail
x = 187110 tf_correct = true assert(isequal(kap(x),tf_correct))

Error in solution: Line: 15 Column: 12 Incorrect use of '=' operator. To assign a value to a variable, use '='. To compare values for equality, use '=='.

27   Fail
x = 208495 tf_correct = true assert(isequal(kap(x),tf_correct))

Error in solution: Line: 15 Column: 12 Incorrect use of '=' operator. To assign a value to a variable, use '='. To compare values for equality, use '=='.

28   Fail
x = 318682 tf_correct = true assert(isequal(kap(x),tf_correct))

Error in solution: Line: 15 Column: 12 Incorrect use of '=' operator. To assign a value to a variable, use '='. To compare values for equality, use '=='.

29   Fail
x = 329967 tf_correct = true assert(isequal(kap(x),tf_correct))

Error in solution: Line: 15 Column: 12 Incorrect use of '=' operator. To assign a value to a variable, use '='. To compare values for equality, use '=='.

30   Fail
x = 351352 tf_correct = true assert(isequal(kap(x),tf_correct))

Error in solution: Line: 15 Column: 12 Incorrect use of '=' operator. To assign a value to a variable, use '='. To compare values for equality, use '=='.

31   Fail
x = 356643 tf_correct = true assert(isequal(kap(x),tf_correct))

Error in solution: Line: 15 Column: 12 Incorrect use of '=' operator. To assign a value to a variable, use '='. To compare values for equality, use '=='.

32   Fail
x = 390313 tf_correct = true assert(isequal(kap(x),tf_correct))

Error in solution: Line: 15 Column: 12 Incorrect use of '=' operator. To assign a value to a variable, use '='. To compare values for equality, use '=='.

33   Fail
x = 461539 tf_correct = true assert(isequal(kap(x),tf_correct))

Error in solution: Line: 15 Column: 12 Incorrect use of '=' operator. To assign a value to a variable, use '='. To compare values for equality, use '=='.

34   Fail
x = 466830 tf_correct = true assert(isequal(kap(x),tf_correct))

Error in solution: Line: 15 Column: 12 Incorrect use of '=' operator. To assign a value to a variable, use '='. To compare values for equality, use '=='.

35   Fail
x = 499500 tf_correct = true assert(isequal(kap(x),tf_correct))

Error in solution: Line: 15 Column: 12 Incorrect use of '=' operator. To assign a value to a variable, use '='. To compare values for equality, use '=='.

36   Fail
x = 500500 tf_correct = true assert(isequal(kap(x),tf_correct))

Error in solution: Line: 15 Column: 12 Incorrect use of '=' operator. To assign a value to a variable, use '='. To compare values for equality, use '=='.

37   Fail
x = 533170 tf_correct = true assert(isequal(kap(x),tf_correct))

Error in solution: Line: 15 Column: 12 Incorrect use of '=' operator. To assign a value to a variable, use '='. To compare values for equality, use '=='.

38   Fail
x = 538461 tf_correct = true assert(isequal(kap(x),tf_correct))

Error in solution: Line: 15 Column: 12 Incorrect use of '=' operator. To assign a value to a variable, use '='. To compare values for equality, use '=='.

39   Fail
x = 609687 tf_correct = true assert(isequal(kap(x),tf_correct))

Error in solution: Line: 15 Column: 12 Incorrect use of '=' operator. To assign a value to a variable, use '='. To compare values for equality, use '=='.

40   Fail
x = 643357 tf_correct = true assert(isequal(kap(x),tf_correct))

Error in solution: Line: 15 Column: 12 Incorrect use of '=' operator. To assign a value to a variable, use '='. To compare values for equality, use '=='.

41   Fail
x = 648648 tf_correct = true assert(isequal(kap(x),tf_correct))

Error in solution: Line: 15 Column: 12 Incorrect use of '=' operator. To assign a value to a variable, use '='. To compare values for equality, use '=='.

42   Fail
x = 670033 tf_correct = true assert(isequal(kap(x),tf_correct))

Error in solution: Line: 15 Column: 12 Incorrect use of '=' operator. To assign a value to a variable, use '='. To compare values for equality, use '=='.

43   Fail
x = 681318 tf_correct = true assert(isequal(kap(x),tf_correct))

Error in solution: Line: 15 Column: 12 Incorrect use of '=' operator. To assign a value to a variable, use '='. To compare values for equality, use '=='.

44   Fail
x = 681319 tf_correct = false assert(isequal(kap(x),tf_correct))

Error in solution: Line: 15 Column: 12 Incorrect use of '=' operator. To assign a value to a variable, use '='. To compare values for equality, use '=='.

45   Fail
x = 681320 tf_correct = false assert(isequal(kap(x),tf_correct))

Error in solution: Line: 15 Column: 12 Incorrect use of '=' operator. To assign a value to a variable, use '='. To compare values for equality, use '=='.

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!