+ 1
narges ghanbari
for value of n between 2 to 4 ,
runs 2*2-1 times
----------
for value of n between 4 to 8,
runs 4*2-1 times,
-----------
for value of between 8 to 16,
runs 8*2-1 times and so on.
Check the following code,
https://code.sololearn.com/cs84pomT48n1/?ref=app