From 787dc13c837f0955fbd85b8f26a05d720d361333 Mon Sep 17 00:00:00 2001 From: Shinya Sato Date: Sun, 24 Oct 2021 23:04:45 +0900 Subject: Upload the comparison directory --- comparison/Python/fib38.py | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 comparison/Python/fib38.py (limited to 'comparison/Python/fib38.py') diff --git a/comparison/Python/fib38.py b/comparison/Python/fib38.py new file mode 100644 index 0000000..efa5380 --- /dev/null +++ b/comparison/Python/fib38.py @@ -0,0 +1,8 @@ +def fib(n): + if n == 0: + return 0 + elif n == 1: + return 1 + else: + return fib(n-1) + fib(n-2) +print(fib(38)) -- cgit v1.2.3