Advertisement
Bad_Programist

Untitled

Oct 28th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.13 KB | None | 0 0
  1. F = int(input())
  2. i1 = 1
  3. i2 = 1
  4. n = 2
  5. while i1 < F:
  6.     i1, i2 = i1 + i2, i1
  7.     n += 1
  8. if i1 == F: print(n)
  9. else: print(-1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement