diff options
| author | Shinya Sato <shinnya.sato@gmail.com> | 2022-08-28 20:44:20 +0900 |
|---|---|---|
| committer | Shinya Sato <shinnya.sato@gmail.com> | 2022-08-28 20:44:20 +0900 |
| commit | baa27f2adf0ad741add152bcbca6ffbd312ef066 (patch) | |
| tree | d4a345ec3cf0bcaccf1ac293cd6ad50802bf9224 /comparison/Python/fib-38.py | |
| parent | e50f2cf8ccab628d0cc90823389355242a23a28a (diff) | |
| parent | b850b9d9e64c12a927bfc2692b4134b23ef79be5 (diff) | |
| download | inpla-baa27f2adf0ad741add152bcbca6ffbd312ef066.tar.gz inpla-baa27f2adf0ad741add152bcbca6ffbd312ef066.zip | |
Merge branch 'develop'
Diffstat (limited to 'comparison/Python/fib-38.py')
| -rw-r--r-- | comparison/Python/fib-38.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/comparison/Python/fib-38.py b/comparison/Python/fib-38.py new file mode 100644 index 0000000..efa5380 --- /dev/null +++ b/comparison/Python/fib-38.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)) |
