Cody

Solution 2053189

Submitted on 10 Dec 2019 by Pauli Huusari
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 = 16; tf_correct = false; assert(isequal(kap(x),tf_correct))

luku = 256 luku_char = '16' perse = '256' takaosa = '56' etuosa = '2' tf = logical 0

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

luku = 495616 luku_char = '704' perse = '495616' takaosa = '616' etuosa = '495' tf = logical 0

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

x = 9 tf_correct = logical 1 luku = 81 luku_char = '9' perse = '81' takaosa = '1' etuosa = '8' tf = logical 1

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

x = 45 tf_correct = logical 1 luku = 2025 luku_char = '45' perse = '2025' takaosa = '25' etuosa = '20' tf = logical 1

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

x = 55 tf_correct = logical 1 luku = 3025 luku_char = '55' perse = '3025' takaosa = '25' etuosa = '30' tf = logical 1

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

x = 99 tf_correct = logical 1 luku = 9801 luku_char = '99' perse = '9801' takaosa = '01' etuosa = '98' tf = logical 1

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

x = 297 tf_correct = logical 1 luku = 88209 luku_char = '297' perse = '88209' takaosa = '209' etuosa = '88' tf = logical 1

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

x = 703 tf_correct = logical 1 luku = 494209 luku_char = '703' perse = '494209' takaosa = '209' etuosa = '494' tf = logical 1

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

x = 999 tf_correct = logical 1 luku = 998001 luku_char = '999' perse = '998001' takaosa = '001' etuosa = '998' tf = logical 1

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

x = 2223 tf_correct = logical 1 luku = 4941729 luku_char = '2223' perse = '4941729' takaosa = '1729' etuosa = '494' tf = logical 1

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

x = 2728 tf_correct = logical 1 luku = 7441984 luku_char = '2728' perse = '7441984' takaosa = '1984' etuosa = '744' tf = logical 1

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

x = 4950 tf_correct = logical 1 luku = 24502500 luku_char = '4950' perse = '24502500' takaosa = '2500' etuosa = '2450' tf = logical 1

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

x = 5050 tf_correct = logical 1 luku = 25502500 luku_char = '5050' perse = '25502500' takaosa = '2500' etuosa = '2550' tf = logical 1

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

x = 7272 tf_correct = logical 1 luku = 52881984 luku_char = '7272' perse = '52881984' takaosa = '1984' etuosa = '5288' tf = logical 1

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

x = 7777 tf_correct = logical 1 luku = 60481729 luku_char = '7777' perse = '60481729' takaosa = '1729' etuosa = '6048' tf = logical 1

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

x = 9999 tf_correct = logical 1 luku = 99980001 luku_char = '9999' perse = '99980001' takaosa = '0001' etuosa = '9998' tf = logical 1

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

x = 17344 tf_correct = logical 1 luku = 300814336 luku_char = '17344' perse = '300814336' takaosa = '14336' etuosa = '3008' tf = logical 1

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

x = 22222 tf_correct = logical 1 luku = 493817284 luku_char = '22222' perse = '493817284' takaosa = '17284' etuosa = '4938' tf = logical 1

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

x = 77778 tf_correct = logical 1 luku = 6.0494e+09 luku_char = '77778' perse = '6049417284' takaosa = '17284' etuosa = '60494' tf = logical 1

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

x = 82656 tf_correct = logical 1 luku = 6.8320e+09 luku_char = '82656' perse = '6832014336' takaosa = '14336' etuosa = '68320' tf = logical 1

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

x = 95121 tf_correct = logical 1 luku = 9.0480e+09 luku_char = '95121' perse = '9048004641' takaosa = '04641' etuosa = '90480' tf = logical 1

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

x = 99999 tf_correct = logical 1 luku = 9.9998e+09 luku_char = '99999' perse = '9999800001' takaosa = '00001' etuosa = '99998' tf = logical 1

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

x = 142857 tf_correct = logical 1 luku = 2.0408e+10 luku_char = '142857' perse = '20408122449' takaosa = '122449' etuosa = '20408' tf = logical 1

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

x = 148149 tf_correct = logical 1 luku = 2.1948e+10 luku_char = '148149' perse = '21948126201' takaosa = '126201' etuosa = '21948' tf = logical 1

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

x = 181819 tf_correct = logical 1 luku = 3.3058e+10 luku_char = '181819' perse = '33058148761' takaosa = '148761' etuosa = '33058' tf = logical 1

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

x = 187110 tf_correct = logical 1 luku = 3.5010e+10 luku_char = '187110' perse = '35010152100' takaosa = '152100' etuosa = '35010' tf = logical 1

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

x = 208495 tf_correct = logical 1 luku = 4.3470e+10 luku_char = '208495' perse = '43470165025' takaosa = '165025' etuosa = '43470' tf = logical 1

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

x = 318682 tf_correct = logical 1 luku = 1.0156e+11 luku_char = '318682' perse = '101558217124' takaosa = '217124' etuosa = '101558' tf = logical 1

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

x = 329967 tf_correct = logical 1 luku = 1.0888e+11 luku_char = '329967' perse = '108878221089' takaosa = '221089' etuosa = '108878' tf = logical 1

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

x = 351352 tf_correct = logical 1 luku = 1.2345e+11 luku_char = '351352' perse = '123448227904' takaosa = '227904' etuosa = '123448' tf = logical 1

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

x = 356643 tf_correct = logical 1 luku = 1.2719e+11 luku_char = '356643' perse = '127194229449' takaosa = '229449' etuosa = '127194' tf = logical 1

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

x = 390313 tf_correct = logical 1 luku = 1.5234e+11 luku_char = '390313' perse = '152344237969' takaosa = '237969' etuosa = '152344' tf = logical 1

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

x = 461539 tf_correct = logical 1 luku = 2.1302e+11 luku_char = '461539' perse = '213018248521' takaosa = '248521' etuosa = '213018' tf = logical 1

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

x = 466830 tf_correct = logical 1 luku = 2.1793e+11 luku_char = '466830' perse = '217930248900' takaosa = '248900' etuosa = '217930' tf = logical 1

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

x = 499500 tf_correct = logical 1 luku = 2.4950e+11 luku_char = '499500' perse = '249500250000' takaosa = '250000' etuosa = '249500' tf = logical 1

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

x = 500500 tf_correct = logical 1 luku = 2.5050e+11 luku_char = '500500' perse = '250500250000' takaosa = '250000' etuosa = '250500' tf = logical 1

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

x = 533170 tf_correct = logical 1 luku = 2.8427e+11 luku_char = '533170' perse = '284270248900' takaosa = '248900' etuosa = '284270' tf = logical 1

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

x = 538461 tf_correct = logical 1 luku = 2.8994e+11 luku_char = '538461' perse = '289940248521' takaosa = '248521' etuosa = '289940' tf = logical 1

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

x = 609687 tf_correct = logical 1 luku = 3.7172e+11 luku_char = '609687' perse = '371718237969' takaosa = '237969' etuosa = '371718' tf = logical 1

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

x = 643357 tf_correct = logical 1 luku = 4.1391e+11 luku_char = '643357' perse = '413908229449' takaosa = '229449' etuosa = '413908' tf = logical 1

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

x = 648648 tf_correct = logical 1 luku = 4.2074e+11 luku_char = '648648' perse = '420744227904' takaosa = '227904' etuosa = '420744' tf = logical 1

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

x = 670033 tf_correct = logical 1 luku = 4.4894e+11 luku_char = '670033' perse = '448944221089' takaosa = '221089' etuosa = '448944' tf = logical 1

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

x = 681318 tf_correct = logical 1 luku = 4.6419e+11 luku_char = '681318' perse = '464194217124' takaosa = '217124' etuosa = '464194' tf = logical 1

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

x = 681319 tf_correct = logical 0 luku = 4.6420e+11 luku_char = '681319' perse = '464195579761' takaosa = '579761' etuosa = '464195' tf = logical 0

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

x = 681320 tf_correct = logical 0 luku = 4.6420e+11 luku_char = '681320' perse = '464196942400' takaosa = '942400' etuosa = '464196' tf = logical 0