I was doing a problem on codechef (problem code: RSIGNS)
I was able to find the formula to solve the problem which is 10*2^(k-1) but the problem consists of large test cases which goes beyond range of unsigned long long int in c++. So the problem editorial suggested to use modular exponentiation to solve the problem. I am having problem in finding the modulo 10^7+9. Please help…
The link to the problem is: https://www.codechef.com/problems/RSIGNS