vault backup: 2023-09-25 23:36:18
This commit is contained in:
23
.obsidian/workspace.json
vendored
23
.obsidian/workspace.json
vendored
@ -4,19 +4,15 @@
|
|||||||
"type": "split",
|
"type": "split",
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"id": "d1d0fb84c1c51d46",
|
"id": "778bfeed44403054",
|
||||||
"type": "tabs",
|
"type": "tabs",
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"id": "2eaee722b622a4ab",
|
"id": "76bf6a235cb7a78d",
|
||||||
"type": "leaf",
|
"type": "leaf",
|
||||||
"state": {
|
"state": {
|
||||||
"type": "markdown",
|
"type": "empty",
|
||||||
"state": {
|
"state": {}
|
||||||
"file": "Algo/Séminaire/Exercices seminaire.md",
|
|
||||||
"mode": "source",
|
|
||||||
"source": false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -85,7 +81,6 @@
|
|||||||
"state": {
|
"state": {
|
||||||
"type": "backlink",
|
"type": "backlink",
|
||||||
"state": {
|
"state": {
|
||||||
"file": "Algo/Séminaire/Exercices seminaire.md",
|
|
||||||
"collapseAll": false,
|
"collapseAll": false,
|
||||||
"extraContext": false,
|
"extraContext": false,
|
||||||
"sortOrder": "alphabetical",
|
"sortOrder": "alphabetical",
|
||||||
@ -102,7 +97,6 @@
|
|||||||
"state": {
|
"state": {
|
||||||
"type": "outgoing-link",
|
"type": "outgoing-link",
|
||||||
"state": {
|
"state": {
|
||||||
"file": "Algo/Séminaire/Exercices seminaire.md",
|
|
||||||
"linksCollapsed": false,
|
"linksCollapsed": false,
|
||||||
"unlinkedCollapsed": true
|
"unlinkedCollapsed": true
|
||||||
}
|
}
|
||||||
@ -124,9 +118,7 @@
|
|||||||
"type": "leaf",
|
"type": "leaf",
|
||||||
"state": {
|
"state": {
|
||||||
"type": "outline",
|
"type": "outline",
|
||||||
"state": {
|
"state": {}
|
||||||
"file": "Algo/Séminaire/Exercices seminaire.md"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -156,13 +148,14 @@
|
|||||||
"command-palette:Open command palette": false
|
"command-palette:Open command palette": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"active": "2eaee722b622a4ab",
|
"active": "c473a791e2b34194",
|
||||||
"lastOpenFiles": [
|
"lastOpenFiles": [
|
||||||
|
"English",
|
||||||
|
"Algo/Séminaire/Exercices seminaire.md",
|
||||||
"Methodologie/Gestion.md",
|
"Methodologie/Gestion.md",
|
||||||
"README.md",
|
"README.md",
|
||||||
"Algo/Séminaire/Remediation.md",
|
"Algo/Séminaire/Remediation.md",
|
||||||
"COM-ADMR/Séjour international EPITA.md",
|
"COM-ADMR/Séjour international EPITA.md",
|
||||||
"Algo/Séminaire/Exercices seminaire.md",
|
|
||||||
"Algo/Séminaire/Chapter 5 - Recursivity.md",
|
"Algo/Séminaire/Chapter 5 - Recursivity.md",
|
||||||
"COM-ADMR",
|
"COM-ADMR",
|
||||||
"Methodologie",
|
"Methodologie",
|
||||||
|
@ -461,6 +461,18 @@ let prime n =
|
|||||||
check n (k + 1)
|
check n (k + 1)
|
||||||
in pr n 2;;
|
in pr n 2;;
|
||||||
(* V2 *)
|
(* V2 *)
|
||||||
|
let prime n =
|
||||||
|
if n < 1 then
|
||||||
|
invalid_args "n should not be inferior to zero"
|
||||||
|
else if x = 2 then true
|
||||||
|
else
|
||||||
|
let rec pr n k =
|
||||||
|
if n = k then
|
||||||
|
true
|
||||||
|
else if n mod k = 0 then
|
||||||
|
false
|
||||||
|
else
|
||||||
|
check n (k + 1)
|
||||||
|
in (n = 2) || (n mod 2 = 1 and check n 3)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user