Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Problem 7
- a = set()
- def f(current, step):
- if step == 8:
- a.add(current)
- else:
- f(current+1, step+1)
- f(current+5, step+1)
- f(current*3, step+1)
- f(1, 0)
- k=0
- for i in range(1000, 1024):
- if i in a:
- k+=1
- print(k)
- #1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement