Cody

Problem 166. Kaprekar numbers

Solution 3300873

Submitted on 21 Oct 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 using kap (line 3) Unable to run the 'fevalJSON' function because it calls the 'input' function, which is not supported for this product offering. Error in Test1 (line 3) assert(isequal(kap(x),tf_correct))

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

Error using kap (line 3) Unable to run the 'fevalJSON' function because it calls the 'input' function, which is not supported for this product offering. Error in Test2 (line 3) assert(isequal(kap(x),tf_correct))

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

x = 9 tf_correct = logical 1

Error using kap (line 3) Unable to run the 'fevalJSON' function because it calls the 'input' function, which is not supported for this product offering. Error in Test3 (line 3) assert(isequal(kap(x),tf_correct))

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

x = 45 tf_correct = logical 1

Error using kap (line 3) Unable to run the 'fevalJSON' function because it calls the 'input' function, which is not supported for this product offering. Error in Test4 (line 3) assert(isequal(kap(x),tf_correct))

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

x = 55 tf_correct = logical 1

Error using kap (line 3) Unable to run the 'fevalJSON' function because it calls the 'input' function, which is not supported for this product offering. Error in Test5 (line 3) assert(isequal(kap(x),tf_correct))

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

x = 99 tf_correct = logical 1

Error using kap (line 3) Unable to run the 'fevalJSON' function because it calls the 'input' function, which is not supported for this product offering. Error in Test6 (line 3) assert(isequal(kap(x),tf_correct))

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

x = 297 tf_correct = logical 1

Error using kap (line 3) Unable to run the 'fevalJSON' function because it calls the 'input' function, which is not supported for this product offering. Error in Test7 (line 3) assert(isequal(kap(x),tf_correct))

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

x = 703 tf_correct = logical 1

Error using kap (line 3) Unable to run the 'fevalJSON' function because it calls the 'input' function, which is not supported for this product offering. Error in Test8 (line 3) assert(isequal(kap(x),tf_correct))

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

x = 999 tf_correct = logical 1

Error using kap (line 3) Unable to run the 'fevalJSON' function because it calls the 'input' function, which is not supported for this product offering. Error in Test9 (line 3) assert(isequal(kap(x),tf_correct))

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

x = 2223 tf_correct = logical 1

Error using kap (line 3) Unable to run the 'fevalJSON' function because it calls the 'input' function, which is not supported for this product offering. Error in Test10 (line 3) assert(isequal(kap(x),tf_correct))

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

x = 2728 tf_correct = logical 1

Error using kap (line 3) Unable to run the 'fevalJSON' function because it calls the 'input' function, which is not supported for this product offering. Error in Test11 (line 3) assert(isequal(kap(x),tf_correct))

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

x = 4950 tf_correct = logical 1

Error using kap (line 3) Unable to run the 'fevalJSON' function because it calls the 'input' function, which is not supported for this product offering. Error in Test12 (line 3) assert(isequal(kap(x),tf_correct))

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

x = 5050 tf_correct = logical 1

Error using kap (line 3) Unable to run the 'fevalJSON' function because it calls the 'input' function, which is not supported for this product offering. Error in Test13 (line 3) assert(isequal(kap(x),tf_correct))

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

x = 7272 tf_correct = logical 1

Error using kap (line 3) Unable to run the 'fevalJSON' function because it calls the 'input' function, which is not supported for this product offering. Error in Test14 (line 3) assert(isequal(kap(x),tf_correct))

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

x = 7777 tf_correct = logical 1

Error using kap (line 3) Unable to run the 'fevalJSON' function because it calls the 'input' function, which is not supported for this product offering. Error in Test15 (line 3) assert(isequal(kap(x),tf_correct))

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

x = 9999 tf_correct = logical 1

Error using kap (line 3) Unable to run the 'fevalJSON' function because it calls the 'input' function, which is not supported for this product offering. Error in Test16 (line 3) assert(isequal(kap(x),tf_correct))

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

x = 17344 tf_correct = logical 1

Error using kap (line 3) Unable to run the 'fevalJSON' function because it calls the 'input' function, which is not supported for this product offering. Error in Test17 (line 3) assert(isequal(kap(x),tf_correct))

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

x = 22222 tf_correct = logical 1

Error using kap (line 3) Unable to run the 'fevalJSON' function because it calls the 'input' function, which is not supported for this product offering. Error in Test18 (line 3) assert(isequal(kap(x),tf_correct))

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

x = 77778 tf_correct = logical 1

Error using kap (line 3) Unable to run the 'fevalJSON' function because it calls the 'input' function, which is not supported for this product offering. Error in Test19 (line 3) assert(isequal(kap(x),tf_correct))

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

x = 82656 tf_correct = logical 1

Error using kap (line 3) Unable to run the 'fevalJSON' function because it calls the 'input' function, which is not supported for this product offering. Error in Test20 (line 3) assert(isequal(kap(x),tf_correct))

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

x = 95121 tf_correct = logical 1

Error using kap (line 3) Unable to run the 'fevalJSON' function because it calls the 'input' function, which is not supported for this product offering. Error in Test21 (line 3) assert(isequal(kap(x),tf_correct))

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

x = 99999 tf_correct = logical 1

Error using kap (line 3) Unable to run the 'fevalJSON' function because it calls the 'input' function, which is not supported for this product offering. Error in Test22 (line 3) assert(isequal(kap(x),tf_correct))

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

x = 142857 tf_correct = logical 1

Error using kap (line 3) Unable to run the 'fevalJSON' function because it calls the 'input' function, which is not supported for this product offering. Error in Test23 (line 3) assert(isequal(kap(x),tf_correct))

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

x = 148149 tf_correct = logical 1

Error using kap (line 3) Unable to run the 'fevalJSON' function because it calls the 'input' function, which is not supported for this product offering. Error in Test24 (line 3) assert(isequal(kap(x),tf_correct))

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

x = 181819 tf_correct = logical 1

Error using kap (line 3) Unable to run the 'fevalJSON' function because it calls the 'input' function, which is not supported for this product offering. Error in Test25 (line 3) assert(isequal(kap(x),tf_correct))

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

x = 187110 tf_correct = logical 1

Error using kap (line 3) Unable to run the 'fevalJSON' function because it calls the 'input' function, which is not supported for this product offering. Error in Test26 (line 3) assert(isequal(kap(x),tf_correct))

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

x = 208495 tf_correct = logical 1

Error using kap (line 3) Unable to run the 'fevalJSON' function because it calls the 'input' function, which is not supported for this product offering. Error in Test27 (line 3) assert(isequal(kap(x),tf_correct))

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

x = 318682 tf_correct = logical 1

Error using kap (line 3) Unable to run the 'fevalJSON' function because it calls the 'input' function, which is not supported for this product offering. Error in Test28 (line 3) assert(isequal(kap(x),tf_correct))

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

x = 329967 tf_correct = logical 1

Error using kap (line 3) Unable to run the 'fevalJSON' function because it calls the 'input' function, which is not supported for this product offering. Error in Test29 (line 3) assert(isequal(kap(x),tf_correct))

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

x = 351352 tf_correct = logical 1

Error using kap (line 3) Unable to run the 'fevalJSON' function because it calls the 'input' function, which is not supported for this product offering. Error in Test30 (line 3) assert(isequal(kap(x),tf_correct))

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

x = 356643 tf_correct = logical 1

Error using kap (line 3) Unable to run the 'fevalJSON' function because it calls the 'input' function, which is not supported for this product offering. Error in Test31 (line 3) assert(isequal(kap(x),tf_correct))

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

x = 390313 tf_correct = logical 1

Error using kap (line 3) Unable to run the 'fevalJSON' function because it calls the 'input' function, which is not supported for this product offering. Error in Test32 (line 3) assert(isequal(kap(x),tf_correct))

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

x = 461539 tf_correct = logical 1

Error using kap (line 3) Unable to run the 'fevalJSON' function because it calls the 'input' function, which is not supported for this product offering. Error in Test33 (line 3) assert(isequal(kap(x),tf_correct))

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

x = 466830 tf_correct = logical 1

Error using kap (line 3) Unable to run the 'fevalJSON' function because it calls the 'input' function, which is not supported for this product offering. Error in Test34 (line 3) assert(isequal(kap(x),tf_correct))

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

x = 499500 tf_correct = logical 1

Error using kap (line 3) Unable to run the 'fevalJSON' function because it calls the 'input' function, which is not supported for this product offering. Error in Test35 (line 3) assert(isequal(kap(x),tf_correct))

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

x = 500500 tf_correct = logical 1

Error using kap (line 3) Unable to run the 'fevalJSON' function because it calls the 'input' function, which is not supported for this product offering. Error in Test36 (line 3) assert(isequal(kap(x),tf_correct))

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

x = 533170 tf_correct = logical 1

Error using kap (line 3) Unable to run the 'fevalJSON' function because it calls the 'input' function, which is not supported for this product offering. Error in Test37 (line 3) assert(isequal(kap(x),tf_correct))

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

x = 538461 tf_correct = logical 1

Error using kap (line 3) Unable to run the 'fevalJSON' function because it calls the 'input' function, which is not supported for this product offering. Error in Test38 (line 3) assert(isequal(kap(x),tf_correct))

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

x = 609687 tf_correct = logical 1

Error using kap (line 3) Unable to run the 'fevalJSON' function because it calls the 'input' function, which is not supported for this product offering. Error in Test39 (line 3) assert(isequal(kap(x),tf_correct))

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

x = 643357 tf_correct = logical 1

Error using kap (line 3) Unable to run the 'fevalJSON' function because it calls the 'input' function, which is not supported for this product offering. Error in Test40 (line 3) assert(isequal(kap(x),tf_correct))

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

x = 648648 tf_correct = logical 1

Error using kap (line 3) Unable to run the 'fevalJSON' function because it calls the 'input' function, which is not supported for this product offering. Error in Test41 (line 3) assert(isequal(kap(x),tf_correct))

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

x = 670033 tf_correct = logical 1

Error using kap (line 3) Unable to run the 'fevalJSON' function because it calls the 'input' function, which is not supported for this product offering. Error in Test42 (line 3) assert(isequal(kap(x),tf_correct))

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

x = 681318 tf_correct = logical 1

Error using kap (line 3) Unable to run the 'fevalJSON' function because it calls the 'input' function, which is not supported for this product offering. Error in Test43 (line 3) assert(isequal(kap(x),tf_correct))

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

x = 681319 tf_correct = logical 0

Error using kap (line 3) Unable to run the 'fevalJSON' function because it calls the 'input' function, which is not supported for this product offering. Error in Test44 (line 3) assert(isequal(kap(x),tf_correct))

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

x = 681320 tf_correct = logical 0

Error using kap (line 3) Unable to run the 'fevalJSON' function because it calls the 'input' function, which is not supported for this product offering. Error in Test45 (line 3) assert(isequal(kap(x),tf_correct))

Suggested Problems

More from this Author23

Community Treasure Hunt

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

Start Hunting!