This is regarding 1993 Paper 1 Question 7.

max=1000
tbl={}
def get(k):
    return tbl[k]
def put(k, v):
    tbl[k]=v
put(0, 1)

for n in range(max):
    put(n, get(n//7) + get((5*n)//7) + n)

return zip(tbl.keys(), tbl.values())

example-results.jpg

Author: Robert Kovacsics

Created: 2018-01-26 Fri 13:53

Validate