def F(n):
if n>3:
if n%2==0:
return n+F(n-1)
else:
return n*n+F(n-2)
return n
k = 0
for i in range(1,10**10):
if F(i)<108:
k+=1
break
print(k)
ответ: 8
def F(n):
if n>3:
if n%2==0:
return n+F(n-1)
else:
return n*n+F(n-2)
else:
return n
k = 0
for i in range(1,10**10):
if F(i)<108:
k+=1
else:
break
print(k)
ответ: 8