Created
October 12, 2019 15:42
-
-
Save mavhc/8dac67dede9310083f326f49b361d032 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import itertools | |
cnts=[[0,0,0,25,0],[9,0,0,0,0],[0,0,32,0,0],[0,0,0,0,16],[0,0,14,0,0]] | |
def getTotal(col): | |
return cnts[0][col]+cnts[1][col]+cnts[2][col]+cnts[3][col]+cnts[4][col] | |
for r0 in itertools.permutations([17,21,8,29],4): | |
for r1 in itertools.permutations([30,26,13]): | |
for r2a in itertools.permutations([15,11]): | |
for r2b in itertools.permutations([19,23]): | |
for r3a in itertools.permutations([28,20]): | |
for r3b in itertools.permutations([24,12]): | |
for r4 in itertools.permutations([27,18,31,10]): | |
cnts=[[r0[0],r0[1],r0[2],25,r0[3]], | |
[9,r1[0],r1[1],r1[2],22], | |
[r2a[0],r2a[1],32,r2b[0],r2b[1]], | |
[r3a[0],r3b[0],r3a[1],r3b[1],16], | |
[r4[0],r4[1],14,r4[2],r4[3]] | |
] | |
if getTotal(0)==100 and getTotal(1)==100 and getTotal(2)==100 and getTotal(3)==100 and getTotal(4)==100: print(cnts) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment