In a nutshell, we have a^b mod 10^9 + 7 ( ^ denotes power )
Range of a & b: 1 <= a,b <= 10^100000
PRE – REQUISITES
The theorem stats that, if p is a prime number, then for any arbitrary integer a
You are given a very large rectangular chocolate bar. You must cut only as 1 x 1 pieces. You are allowed to do only ‘K’ cuts at the maximum. What is maximum number of chocolate pieces can u cut ?
For a detailed problem statement click here