vault backup: 2023-10-20 15:33:32

This commit is contained in:
2023-10-20 15:33:32 +02:00
parent dd37f90a0d
commit 2917408758
2 changed files with 22 additions and 8 deletions

View File

@ -282,6 +282,20 @@ Complexity : $O(\sum_{\forall{l\in{(el::ll)}}}^{}1+length(l))$
## Exercise 6.1
```Ocaml
let rec decompose x =
if ()
if (x % 2) = 0 then
if x = 1 then
return x
else if x % 2 == 0 then
decompose(x/2)
else if x%3 = 0 then
decompose(x/3)
else if x%5 = 0 then
decompose(x/5)
else if x%7 = 0 then
decompose(x/7)
else if x%9 = 0 then
decompose(x/9)
else if x%11 = 0 then
decompose(x/11)
else if x%13 = 0 then
decompose(x/13)
else return x