def solve(self, cipher):
        N, K = cipher
        LSB = pow(2, N - 1, 10 ** K)

        # calculate MSB
        MSB = int(str(self.get_MSB(2, N - 1) * 10 ** K)[:K])

        return MSB + LSB
first K digit of B^N
dataset/ETHPy150Open algorhythms/HackerRankAlgorithms/Journey to Mars.py/Solution.solve