15. Suppose there are 128 ones written on a blackboard. In each step, you can erase any two numbers \(a\) and \(b\) and write \(ab + 1\). After performing this operation 127 times, only one number remains. Let the maximum possible value of this remaining number be \(A\). Determine the last digit of \(A\).
(1992 Saint Petersburg City Team Selection Test)
15. First, prove that as long as each step involves the operation on the smallest two numbers on the blackboard, the final remaining number can reach its maximum value. We denote the operation on numbers \(a\) and \(b\) on the blackboard as \(a * b = ab + 1\). Suppose at some step, the operation is not performed on the smallest two numbers \(x\) and \(y\), then before \(x\) and \(y\) "meet," they have already "met" with some \(a_i, b_j\) respectively, and these numbers \(a_i, b_j\) are all greater than \(x\) and \(y\). That is, \(a = \left(\left(\cdots\left(x * a_{1}\right) * a_{2}\right) \cdots * a_{k}\right) = a_{1} a_{2} \cdots a_{k}\left(x + \frac{1}{a_{1}} + \frac{1}{a_{1} a_{2}} + \cdots + \frac{1}{a_{1} a_{2} \cdots a_{k}}\right)\), \(b = \left(\left(\cdots(y * b_{1}) * b_{2}\right) \cdots * b_{n}\right) = b_{1} b_{2} \cdots b_{n}\left(y + \frac{1}{b_{1}} + \frac{1}{b_{1} b_{2}} + \cdots + \frac{1}{b_{1} b_{2} \cdots b_{n}}\right)\). Let \(u = \frac{1}{a_{2}} + \frac{1}{a_{2} a_{3}} + \cdots + \frac{1}{a_{2} a_{3} \cdots a_{k}}\), \(v = \frac{1}{b_{1}} + \frac{1}{b_{1} b_{2}} + \cdots + \frac{1}{b_{1} b_{2} \cdots b_{n}}\). Thus, \(a = a_{2} a_{3} \cdots a_{k}\left(a_{1} x + 1 + u\right)\), \(b = b_{1} b_{2} \cdots b_{n}(y + v)\). Without loss of generality, assume \(y < x\). Then, \(y * a = y(a_{1} x + 1 + u) + 1 = y a_{1} x + y + y u + 1\), and \(x * b = x(b_{1} y + 1 + v) + 1 = x b_{1} y + x + x v + 1\). Since \(y < x\), we have \(y a_{1} x + y + y u + 1 < x b_{1} y + x + x v + 1\), which means the exchange results in a larger final remaining number. This proves the initial claim. Therefore, as long as each operation is performed on the smallest two numbers on the blackboard, the maximum possible value can be obtained. Thus, after 64 steps, the blackboard has 64 twos; after another 32 steps, the blackboard has 32 fives; continuing this process, we get 16 twenty-sixes, 8 five hundred seventy-sevens, 4 three hundred thirty-two thousand nine hundred thirty, 2 numbers with the last digit being 1, and finally, we get a maximum number with the last digit being 2.