scientific_comp_projects/CODE/[python]kattis/trivial/planina.py
2021-10-29 15:16:40 +02:00

12 lines
207 B
Python

iter = input('How many iterations (1<N<15) :')
iter = int(iter)
def planina(n):
if n>1 :
return planina(n-1)+planina(n-1)-1
if n==1 :
return 3
p = planina(iter)**2
print(p)