Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def f(n):
- total = 0
- i=1
- while i <= n:
- for j in range(i):
- total = total + 1
- i=i*2
- return total
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement