Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def zn(x):
- x=abs(x)
- x+=4
- x=x//5
- x=pow(2,x)%2
- return x
- b=int(input());
- b=b-1
- x=1
- n=2
- while(n<b):
- n=n+1
- k=int(x*(1+pow(5,0.5))/2);
- x=k+zn(n%3)*(k%2)+(1-zn(n%3))*zn(k%2);
- print(x);
- else:
- print()
- n=n+1
- x=x-zn(b)
- print(x)
Add Comment
Please, Sign In to add comment