Solution:
a. Let us write n=10a+b with a and b decimal digits, that is 1≤a≤9 and 1≤b≤9: by hypothesis a=0 is not possible (since n>10), and b=0 is not possible because in that case, erasing the first digit of n would give 0, which does not divide n. The conditions are then that a divides 10a+b, which is equivalent to the fact that a divides 10a+b−10a=b, and that b divides 10a+b, equivalent to b dividing 10a+b−b=10a. Let us then set b=ka, where k is an integer such that 1≤k≤9. We find that b=ka divides 10a, that is, k divides 10: if k=1 we find nine solutions in which a=b, namely n=11,22,33,44,55,66,77,88,99. If k=2 then b<10 implies a<5, and we find the solutions n=12,24,36,48. Finally, if k=5, we similarly find the unique solution n=15.
b. Let us write n=10a+b with 1≤b≤9 the last digit of n and 1≤a=(n−b)/10 an integer (this time not necessarily of a single digit). Erasing the last digit, we find that a must divide 10a+b, and hence also that a divides (10a+b)−10⋅a=b. Since b is a positive number less than or equal to 9, then a (which divides b) also cannot exceed 9, so a is composed of a single digit and n is written with two decimal digits as desired. The solutions are then only those found in the previous point, which are all valid because they have no zero digits.