@@@@@@@@@@@@@
while(num != 0)
{
pos ++ ;
num = num / 2 ;
}
pos - - ;
@@@@@@@@@@@@@
If I use above code for determining pos , I am getting AC .
And if I use below code for determining pos , I am getting WA .
@@@@@@@@@@@@@@@
pos = floor( log 2 ( num ) );
@@@@@@@@@@@@@@@
Range of num : 1 <= num <= 10^18