Commit e59d571e authored by Vincent-Xavier JUMEL's avatar Vincent-Xavier JUMEL 📚
Browse files

Résoud de façon réelle #20


Signed-off-by: Vincent-Xavier JUMEL's avatarVincent-Xavier JUMEL <endymion@thetys-retz.net>
parent 3a52fdb8
Pipeline #179128 passed with stages
in 2 minutes and 11 seconds
......@@ -125,14 +125,13 @@ def chemin_long_3(dictionnaire, start):
Par exemple : pour le sommet 0 et le dictionnaire complet, on obtient:
[[0, 20, 25], [0, 20, 18], [0, 15, 19], [0, 15, 5]]
Test :
>>> chemin_long_3({0: [20, 15], 1: [18, 13], 2: [17, 7], 3: [24, 7],
4: [18, 11], 5: [19, 14], 6: [4, 13], 7: [24, 3], 8: [26, 23], 9: [25, 20],
10: [22, 23], 11: [13, 22], 12: [4, 13], 13: [16, 12], 14: [17, 4],
15: [19, 5], 16: [18, 13], 17: [4, 15], 18: [25, 23], 19: [5, 14],
20: [25, 18], 21: [25, 18], 22: [13, 23], 23: [8, 18], 24: [3, 7],
>>> chemin_long_3({0: [20, 15], 1: [18, 13], 2: [17, 7], 3: [24, 7], \
4: [18, 11], 5: [19, 14], 6: [4, 13], 7: [24, 3], 8: [26, 23], 9: [25, 20], \
10: [22, 23], 11: [13, 22], 12: [4, 13], 13: [16, 12], 14: [17, 4], \
15: [19, 5], 16: [18, 13], 17: [4, 15], 18: [25, 23], 19: [5, 14], \
20: [25, 18], 21: [25, 18], 22: [13, 23], 23: [8, 18], 24: [3, 7], \
25: [18, 20], 26: [13, 23]}, 0)
[[0, 20, 25], [0, 20, 18], [0, 15, 19], [0, 15, 5]]
[[0, 20, 25, 18], [0, 20, 25, 20], [0, 20, 18, 25], [0, 20, 18, 23], [0, 15, 19, 5], [0, 15, 19, 14], [0, 15, 5, 19], [0, 15, 5, 14]]
"""
l0=[start]
l1=list(l0)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment