Ответ:
def F(n):
if n == 1:
return 1
elif n % 2 == 0:
return n + F(n-1)
elif n % 2 != 0:
return 2*F(n-2)
print(F(25))
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Ответ:
def F(n):
if n == 1:
return 1
elif n % 2 == 0:
return n + F(n-1)
elif n % 2 != 0:
return 2*F(n-2)
print(F(25))