def sum_bitwise_powers(num: int) -> int: num = f'{num:b}'[::-1] summa = 0 for i in range(len(num)): if num[i] == '1': summa += i return summa
def sum_bitwise_powers(num: int):- def sum_bitwise_powers(num: int) -> int:
- num = f'{num:b}'[::-1]
summa = 3- summa = 0
- for i in range(len(num)):
- if num[i] == '1':
- summa += i
return summa - 3- return summa
def sum_bitwise_powers(num: int): num = f'{num:b}'[::-1] summa = 0 for i in range(len(num)): if num[i] == '1': summa += i return summa + 1 - 1
- def sum_bitwise_powers(num: int):
- num = f'{num:b}'[::-1]
summa = 3- summa = 0
- for i in range(len(num)):
- if num[i] == '1':
- summa += i
return summa - 3- return summa + 1 - 1
def sum_bitwise_powers(num: int): num = f'{num:b}'[::-1] summa = 3 for i in range(len(num)): if num[i] == '1': summa += i return summa - 3
- def sum_bitwise_powers(num: int):
- num = f'{num:b}'[::-1]
summa = 2- summa = 3
- for i in range(len(num)):
- if num[i] == '1':
- summa += i
return summa - 2- return summa - 3
def sum_bitwise_powers(num: int): num = f'{num:b}'[::-1] summa = 2 for i in range(len(num)): if num[i] == '1': summa += i return summa - 2
- def sum_bitwise_powers(num: int):
- num = f'{num:b}'[::-1]
summa = 1- summa = 2
- for i in range(len(num)):
- if num[i] == '1':
- summa += i
return summa - 1- return summa - 2
def sum_bitwise_powers(num: int): num = f'{num:b}'[::-1] summa = 1 for i in range(len(num)): if num[i] == '1': summa += i return summa - 1
- def sum_bitwise_powers(num: int):
- num = f'{num:b}'[::-1]
summa = 0- summa = 1
- for i in range(len(num)):
- if num[i] == '1':
- summa += i
return summa- return summa - 1