vault backup: 2023-11-27 13:24:47

This commit is contained in:
Louis Gallet 2023-11-27 13:24:47 +01:00
parent 65c850800c
commit 1193897938
Signed by: lgallet
SSH Key Fingerprint: SHA256:qnW7pk4EoMRR0UftZLZQKSMUImbEFsiruLC7jbCHJAY

View File

@ -187,6 +187,23 @@ def mirror(n: int) -> int;
return res return res
``` ```
## Exercise 2.3
```python
def factorial(limit: n) -> int:
n = 0
if limit <= n:
return n
else:
f = 1
while f < limit:
n += 1
f *= n
if n % 2 == 0:
return (n-2)
else:
return (n-1)
```
## Exercise 3.3 ## Exercise 3.3
```python ```python
def quotient(a: int, b: int) -> int: def quotient(a: int, b: int) -> int: