Can somebody explain the fastest solution


#1

Can somebody explain the fastest solution


#2

Well apparently when the number exceeds the value of long long range, it gets set to an offset value starting from the last closest power of 2 of the number. It contradicts the initial understanding that the number is given garbage value when it exceeds the range;