COMC 2018 C Problem 4

Given a positive integer N, Matt writes N in decimal on a blackboard, without writing any of the leading $0$s. Every minute he takes two consecutive digits, erases them, and replaces them with the last digit of their product. Any leading zeroes created this way are also erased. He repeats this process for as long as he likes. We call the positive integer M obtainable from N if starting from N, there is a finite sequence of moves that Matt can make to produce the number M. For example, 10 is obtainable from 251023 via

2510 \underline{23} \rightarrow \underline{25106} \rightarrow \underline{106} \rightarrow 10

(a) Show that 2018 is obtainable from 2567777899.
(b) Find two positive integers A and B for which there is no positive integer C such that both A and B are obtainable from C.
(c) Let S be any finite set of positive integers, none of which contains the digit 5 in its decimal representation. Prove that there exists a positive integer N for which all elements of S are obtainable from N.