Skip to content

Commit

Permalink
maj
Browse files Browse the repository at this point in the history
  • Loading branch information
glassus committed Nov 16, 2023
1 parent ff0fef8 commit 5d69f29
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions docs/T2_Representation_des_donnees/2.1_Listes/exercices.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,19 +196,22 @@


=== "Correction"
{{ correction(False,
{{ correction(True,
"
```python linenums='1'
M=[[17, 3, 4, 14, 5, 17], [8, 16, 3, 17, 14, 12], [13, 5, 15, 4, 16, 3], [14, 7, 3, 16, 3, 2], [6, 1, 16, 10, 5, 13], [11, 1, 9, 11, 18, 8]]
M = [[17, 3, 4, 14, 5, 17], [8, 16, 3, 17, 14, 12], [13, 5, 15, 4, 16, 3], [14, 7, 3, 16, 3, 2], [6, 1, 16, 10, 5, 13], [11, 1, 9, 11, 18, 8]]

def f(k):
return (9*k + 3) % 19

for _ in range(39):
def tour():
for i in range(6):
for j in range(6):
M[i][j] = f(M[i][j])

for _ in range(39):
tour()

somme = 0
for i in range(6):
for j in range(6):
Expand Down

0 comments on commit 5d69f29

Please sign in to comment.