Initial release

This commit is contained in:
Francois JUMELLE
2021-05-03 22:32:40 +02:00
commit 20526d93c8
928 changed files with 452368 additions and 0 deletions

20
La chambre des pairs.py Normal file
View File

@@ -0,0 +1,20 @@
L=['A', 'B', 'M', 'D', 'E', 'F', 'L', 'H', 'I', 'J', 'R', 'G', 'N', 'C', 'O', 'Q', 'P', 'K', 'S', 'Y', 'U', 'V', 'W', 'X', 'T', 'Z', '/', '+', '-', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
N=[ 0, 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, 100, 100, 100, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
table=dict()
for i in range(len(L)):
table[L[i]] = N[i]
text = open("EVEN.txt", "r").read()
pairs = list()
string_pair = ""
for c in text:
if table[c]%2==0:
string_pair = string_pair+c
else:
pairs.append(string_pair)
string_pair=""
solution = max(pairs, key=len)
print(solution)