Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- N=10
- def solvepospell1(x1,y1,i,n):
- while i < n:
- x=2024*x1+91035*y1
- y=45*x1+2024*y1
- print(x,y)
- return solvepospell1(x,y,i+1,n)
- def solvepospell2(x1,y1,i,n):
- while i < n:
- x=2024*x1-91035*y1
- y=-45*x1+2024*y1
- print(x,y)
- return solvepospell2(x,y,i+1,n)
- # driver code
- print("x y")
- print(1,0)
- solvepospell1(1,0,1,N)
- print(-1,0)
- solvepospell2(1,0,1,N)
- print(1,0)
- solvepospell1(-1,0,1,N)
- print(-1,0)
- solvepospell2(-1,0,1,N)
Advertisement
Add Comment
Please, Sign In to add comment