Advertisement
Guest User

Untitled

a guest
Feb 19th, 2020
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.12 KB | None | 0 0
  1. i=int(input())
  2. a=1
  3. a1=1
  4. k=2
  5. while a1<i:
  6.     a,a1=a1,a+a1
  7.     k+=1
  8.  
  9. if a1==i:
  10.     print(k)
  11. else:
  12.     print(-1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement