vault backup: 2023-11-27 13:24:47
This commit is contained in:
parent
65c850800c
commit
1193897938
@ -187,6 +187,23 @@ def mirror(n: int) -> int;
|
||||
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
|
||||
```python
|
||||
def quotient(a: int, b: int) -> int:
|
||||
|
Loading…
x
Reference in New Issue
Block a user