diff options
| author | Shinya Sato <shinnya.sato@gmail.com> | 2022-08-28 20:40:57 +0900 |
|---|---|---|
| committer | Shinya Sato <shinnya.sato@gmail.com> | 2022-08-28 20:40:57 +0900 |
| commit | 02a84743ddf5c8c27a36c4d5a20eaf3cd2a9aff4 (patch) | |
| tree | 8bb368481caaa87f281358bb746edcc881b7e54c /comparison/Python/fib-38.py | |
| parent | 3547d92c3601f8c6c295636cd2394b1d85c31bc1 (diff) | |
| download | inpla-02a84743ddf5c8c27a36c4d5a20eaf3cd2a9aff4.tar.gz inpla-02a84743ddf5c8c27a36c4d5a20eaf3cd2a9aff4.zip | |
Update for n-queens
Diffstat (limited to '')
| -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)) |
