vault backup: 2023-09-25 14:29:27

This commit is contained in:
Louis Gallet 2023-09-25 14:29:27 +02:00
parent 7f3dd95837
commit e03032f741
Signed by: lgallet
SSH Key Fingerprint: SHA256:qnW7pk4EoMRR0UftZLZQKSMUImbEFsiruLC7jbCHJAY

View File

@ -444,14 +444,12 @@ $$
$$ $$
= O(log(n)) = O(log(n))
$$ $$
## 4.12 - Prime number ## Exercise 4.12 - Prime number
```Ocaml ```Ocaml
let prime n = let prime n =
if n < 1 then if n < 1 then
invalid_args "n should not be inferior to zero" invalid_args "n should not be inferior to zero"
else else if n mod 2 = 0 then
let rec p n = false
if n = 0 then
1
else else