Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def calkin(n):
- L=[(1,1)]
- for x in range(1,n+1):
- for i in L:
- yield (L[0]+L[1],L[1])
- yield (L[0],L[0]+L[1])
- L=[(x+y,y) for (x,y) in L]+[(x,x+y) for (x,y) in L]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement