Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n = int(input("Введите число до 40: "))
- a = 0
- b = 1
- if n == 1:
- print(0)
- elif n == 2:
- print(1)
- elif n < 40 and not n == 1 and not n == 2:
- n = n-2
- for ch in range(n):
- c = a+b
- a = b
- b = c
- print(c)
Advertisement
Add Comment
Please, Sign In to add comment