Why is my arithmetic with a long long int behaving this way?
The issue with LL m = pow(2, n + 1) – 2; is that pow(2, n + 1) is not a long long. It has the type double (refer to cppreference) and because the value is so large, subtracting 2 from it will not change its value. That means that m will not have the … Read more