Ответ: 2047
def f(n):
if n == 0:
return 0
elif n % 2 == 0:
return f(n / 2)
else:
return 1 + f(n - 1)
for i in range(1, 2100):
if f(i) == 11:
print(i)
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Ответ: 2047
def f(n):
if n == 0:
return 0
elif n % 2 == 0:
return f(n / 2)
else:
return 1 + f(n - 1)
for i in range(1, 2100):
if f(i) == 11:
print(i)