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

View File

@@ -0,0 +1,22 @@
solutions = list()
m1 = 7
m2 = 11
m3 = 13
miam = 4*131
for i in range(1, 21):
for j in range(1, 21):
for k in range(1, 21):
if i*m1+j*m2+k*m3 == miam:
solutions.append((i,j,k))
min_sac = 60
for solution in solutions:
min_sac = min(solution[0]+solution[1]+solution[2], min_sac)
best = (20, 20, 20)
for solution in solutions:
if solution[0]+solution[1]+solution[2] == min_sac and solution[2] < best[2]:
best = solution
print(best, best[0]*m1+best[1]*m2+best[2]*m3, best[0]+best[1]+best[2])