Cody

# Problem 43257. Persistence will not help you solve this problem.

Solution 1578121

Submitted on 8 Jul 2018 by David Verrelli
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
for i = 1:100 clear functions a = counterfun; validatestring(char(a), {char(i)}) assert(isequal(a,i)) end

a = 1 ans = '' a = 2 ans = '' a = 3 ans = '' a = 4 ans = '' a = 5 ans = '' a = 6 ans = '' a = 7 ans = '' a = 8 ans = '' a = 9 ans = ' ' a = 10 ans = ' ' a = 11 ans = ' ' a = 12 ans = ' ' a = 13 ans = ' ' a = 14 ans = '' a = 15 ans = '' a = 16 ans = '' a = 17 ans = '' a = 18 ans = '' a = 19 ans = '' a = 20 ans = '' a = 21 ans = '' a = 22 ans = '' a = 23 ans = '' a = 24 ans = '' a = 25 ans = '' a = 26 ans = '' a = 27 ans = '' a = 28 ans = '' a = 29 ans = '' a = 30 ans = '' a = 31 ans = '' a = 32 ans = ' ' a = 33 ans = '!' a = 34 ans = '"' a = 35 ans = '#' a = 36 ans = '\$' a = 37 ans = '%' a = 38 ans = '&' a = 39 ans = ''' a = 40 ans = '(' a = 41 ans = ')' a = 42 ans = '*' a = 43 ans = '+' a = 44 ans = ',' a = 45 ans = '-' a = 46 ans = '.' a = 47 ans = '/' a = 48 ans = '0' a = 49 ans = '1' a = 50 ans = '2' a = 51 ans = '3' a = 52 ans = '4' a = 53 ans = '5' a = 54 ans = '6' a = 55 ans = '7' a = 56 ans = '8' a = 57 ans = '9' a = 58 ans = ':' a = 59 ans = ';' a = 60 ans = '<' a = 61 ans = '=' a = 62 ans = '>' a = 63 ans = '?' a = 64 ans = '@' a = 65 ans = 'A' a = 66 ans = 'B' a = 67 ans = 'C' a = 68 ans = 'D' a = 69 ans = 'E' a = 70 ans = 'F' a = 71 ans = 'G' a = 72 ans = 'H' a = 73 ans = 'I' a = 74 ans = 'J' a = 75 ans = 'K' a = 76 ans = 'L' a = 77 ans = 'M' a = 78 ans = 'N' a = 79 ans = 'O' a = 80 ans = 'P' a = 81 ans = 'Q' a = 82 ans = 'R' a = 83 ans = 'S' a = 84 ans = 'T' a = 85 ans = 'U' a = 86 ans = 'V' a = 87 ans = 'W' a = 88 ans = 'X' a = 89 ans = 'Y' a = 90 ans = 'Z' a = 91 ans = '[' a = 92 ans = '\' a = 93 ans = ']' a = 94 ans = '^' a = 95 ans = '_' a = 96 ans = '`' a = 97 ans = 'a' a = 98 ans = 'b' a = 99 ans = 'c' a = 100 ans = 'd'