We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aef2eae commit f4c44bcCopy full SHA for f4c44bc
2.Conditionals and Loops/Nth Fibonacci number.ipynb
@@ -46,6 +46,24 @@
46
"n=int(input())\n",
47
"print(Fibonacci(n))"
48
]
49
+ },
50
+ {
51
+ "cell_type": "code",
52
+ "execution_count": null,
53
+ "metadata": {},
54
+ "outputs": [],
55
+ "source": [
56
+ "# Use This To Solve Time Exceed Error\n",
57
+ "n = int(input())\n",
58
+ "a = 0\n",
59
+ "b = 1\n",
60
+ "c = -1\n",
61
+ "for i in range(n) :\n",
62
+ " c = a + b\n",
63
+ " a = b\n",
64
+ " b = c \n",
65
+ "print(a)"
66
+ ]
67
}
68
],
69
"metadata": {
0 commit comments