Provincial tournament 10-CA- questions B: the number of columns evaluated

Given the number of columns # 1, 1, 1, 3, 5, 9, 17, ..., starting from the item 4, each of the former three and are.
# Find the last 4 digits of the first 20,190,324.
= A [0,1,1,1]
for J in Range (4,20190325):
    X = A [-J. 1] + A [J-2] + A [J. 3-]
    IF X> 10000:
       X% 1000 =
    a.append (X)
Print (A [20,190,324])

Published 10 original articles · won praise 0 · Views 205

Guess you like

Origin blog.csdn.net/tianrandai12/article/details/104050533