in this equation
#define mod 1000000007
int n;
int num = ((1<<n)%mod)+2;
I have to left shift 1 by any value of n and then perform mod operation to contain the result within the range of int. But the 1<<n
is not showing correct value for bigger values of n such as 1000 or 10000. How to do it ?