1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
| # len a pair
a = '123456'
n = 2
t = 123, 456
n = 3
t = 12, 34, 56
n = 4
t = 12, 23, 45, 56
n = 5
t = 12, 23, 34, 45, 56
n = 6
t = 1, 2, 3, 4, 5, 6
# len a impair
a = 1234567
n = 2
t = 1234, 4567
n = 3
t = 123, 345, 567
n = 4
t = 12, 34, 45, 67
n = 5 => PROBLÈME INSOLUBLE EN GROUPES DE 2
t = 12, 23, (3,4 ou 4, 5) ?, 56, 67
# Passage donc par groupes de 3
t = 123, 234, 345, 456, 567
n = 6
t = 12, 23, 34, 45, 56, 67
n = 7
t = 1, 2, 3, 4, 5, 6, 7 |