Search:
Browse Source
Home
Download
Documentation
Community
Ticket #17273
: fib.py
File fib.py,
94 bytes
(added by
ocecaco
,
7 years ago
)
Fibonacci number calculation used in host to cause high CPU usage
Line
1
def
fib
(
n
):
2
if
n
<
2
:
3
return
n
4
return
fib
(
n
-
1
)
+
fib
(
n
-
2
)
5
6
print
(
fib
(
40
))
Download in other formats:
Original Format