I found this question on a Chinese programmer forum. They solved it by brute-force method like 2 ** 10000[99] in python. The solution is 9. I’m wondering if we can solve it in a better way? Do we have to calculate $2^{10000}$ first?
I don’t even know what tags I should put. Any suggestions or modifications would be appreciated.