what will be the remainder if 2 ^ 300 is divided by 4 ?
d 4 now if you go on calculating 2 ^ 300 , you will lose so much time and it might not even be feasible to carry out so long of calculations . thus we will make use of a trick here . we will calculate the remainder of each power of 2 till we come across a pattern . 2 ^ 1 divided by 4 leaves the remainder 2 . 2 ^ 2 divided by 4 leaves the remainder 0 . 2 ^ 3 divided by 4 leaves the remainder 0 . 2 ^ 4 divided by 4 leaves the remainder 0 . you can see that all the following powers of two will be divisible by 4 . therefore the remainder when 2 ^ 300 is divided by 4 will be 0 only .
power(2, const_2)