#2075: Tricks


1652274-5@g.puiching.edu.mo (P6A05何承禧)

School : No School
ID : 2934
IP address : [192.168.120.33]
Last Login :
2025-05-27 09:41:24
a104. Fibonacci sequence | From: [192.168.120.33] | Post Date : 2025-05-14 16:31

Well, from the question, you can use this:

 

(Python)

 

def a(n):

    return a(n - 1) + a(n - 2)

 

 

you can also use a list to store the items and print it out :D

 
#2497: Re:Tricks


1752786-4@g.puiching.edu.mo (林敬晉P5A08(JalenLam_progamer)(IQ...)

School : Pui Ching Middle School
ID : 3260
IP address : [192.168.120.33]
Last Login :
2025-06-05 11:37:15
a104. Fibonacci sequence | From: [192.168.120.33] | Post Date : 2025-06-09 16:01

Well, from the question, you can use this:

 

(Python)

 

def a(n):

    return a(n - 1) + a(n - 2)

 

 

you can also use a list to store the items and print it out :D


you are wrong

def num(n):

    if n==1 or n==2:

        return 1

    return num(n - 1) + num(n - 2)

it is the correct form

 
ZeroJudge Forum