对于给定的数组[x1,x2,x3,…,xn],计算幂的累积:x1^(x2^(x3^(…^xn))的最后一位(十进制)数字。例如,对于数组[3,4,2],您的代码应该返回1,因为3^(4^2)=3^16=43046721。结果的增长得快得令人难以置信。例如,9^(9^9)有超过3.69亿个数字。你计算的lastDigit必须有效地处理这些数字。我们假设0^0=1,并且空列表的lastDigit等于1。算法实现:1usingSystem;2usingSystem.Collections.Generic;3usingSystem.Linq;4usingSystem.Numerics;5namespa