Blue Bridge Cup Python Group - Sequence Evaluation

Blue Bridge Cup Python Group - Sequence Evaluation

insert image description here

a, b, c, d = 1, 1, 1, 0
for i in range(4, 20190325):
    #取余10000保留后四位数,让程序跑快点
    d = (a + b + c)%10000
    a, b, c = b, c, d
print(a, b, c, d)

The answer is 4659
Thank you for your support. Your one-click three-connection is the biggest driving force for Ganggang students!

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324321842&siteId=291194637