How can I reduce the execution time of this program to 0.1 miliseconds. The program is suppose to write the k number of a string that started from the number p. As an example: 9 19 39 49 69 79 99 109 129 139 159 ... is the string for the number 9, or 7 17 37 47 67 77 97 107 127 137 157 ... is the string for the number 7.
2<=p<=9.