Created
May 29, 2019 05:06
-
-
Save tuankiet65/7b9f8d4b81d82416edcd6189c91cffe4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
steps = int(input()) | |
a = [0] * max(steps, 2) | |
a[0] = 1 | |
a[1] = 2 | |
for i in range(2, steps): | |
a[i] = a[i-1] + a[i-2] | |
print(a[steps-1]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment