Last active
December 23, 2020 20:16
-
-
Save AllanLRH/bb8c584e89f674f29526e3ed3dee5852 to your computer and use it in GitHub Desktop.
Esbilon
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
b = np.arange(0, 36) | |
m = b[:, None, None] + b[None, :, None] + b[None, None, :] | |
mask = m ==35 | |
ix = np.where(mask) | |
ans = np.stack(ix, axis=1) | |
assert (ans.sum(axis=1) == 35).all(), "Oh no! wrong resuult :'(" | |
print(ans.shape, end='\n\n-----------\n\n') | |
print(*ans, sep='\n') |
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
(666, 3) | |
----------- | |
[ 0 0 35] | |
[ 0 1 34] | |
[ 0 2 33] | |
[ 0 3 32] | |
[ 0 4 31] | |
[ 0 5 30] | |
[ 0 6 29] | |
[ 0 7 28] | |
[ 0 8 27] | |
[ 0 9 26] | |
[ 0 10 25] | |
[ 0 11 24] | |
[ 0 12 23] | |
[ 0 13 22] | |
[ 0 14 21] | |
[ 0 15 20] | |
[ 0 16 19] | |
[ 0 17 18] | |
[ 0 18 17] | |
[ 0 19 16] | |
[ 0 20 15] | |
[ 0 21 14] | |
[ 0 22 13] | |
[ 0 23 12] | |
[ 0 24 11] | |
[ 0 25 10] | |
[ 0 26 9] | |
[ 0 27 8] | |
[ 0 28 7] | |
[ 0 29 6] | |
[ 0 30 5] | |
[ 0 31 4] | |
[ 0 32 3] | |
[ 0 33 2] | |
[ 0 34 1] | |
[ 0 35 0] | |
[ 1 0 34] | |
[ 1 1 33] | |
[ 1 2 32] | |
[ 1 3 31] | |
[ 1 4 30] | |
[ 1 5 29] | |
[ 1 6 28] | |
[ 1 7 27] | |
[ 1 8 26] | |
[ 1 9 25] | |
[ 1 10 24] | |
[ 1 11 23] | |
[ 1 12 22] | |
[ 1 13 21] | |
[ 1 14 20] | |
[ 1 15 19] | |
[ 1 16 18] | |
[ 1 17 17] | |
[ 1 18 16] | |
[ 1 19 15] | |
[ 1 20 14] | |
[ 1 21 13] | |
[ 1 22 12] | |
[ 1 23 11] | |
[ 1 24 10] | |
[ 1 25 9] | |
[ 1 26 8] | |
[ 1 27 7] | |
[ 1 28 6] | |
[ 1 29 5] | |
[ 1 30 4] | |
[ 1 31 3] | |
[ 1 32 2] | |
[ 1 33 1] | |
[ 1 34 0] | |
[ 2 0 33] | |
[ 2 1 32] | |
[ 2 2 31] | |
[ 2 3 30] | |
[ 2 4 29] | |
[ 2 5 28] | |
[ 2 6 27] | |
[ 2 7 26] | |
[ 2 8 25] | |
[ 2 9 24] | |
[ 2 10 23] | |
[ 2 11 22] | |
[ 2 12 21] | |
[ 2 13 20] | |
[ 2 14 19] | |
[ 2 15 18] | |
[ 2 16 17] | |
[ 2 17 16] | |
[ 2 18 15] | |
[ 2 19 14] | |
[ 2 20 13] | |
[ 2 21 12] | |
[ 2 22 11] | |
[ 2 23 10] | |
[ 2 24 9] | |
[ 2 25 8] | |
[ 2 26 7] | |
[ 2 27 6] | |
[ 2 28 5] | |
[ 2 29 4] | |
[ 2 30 3] | |
[ 2 31 2] | |
[ 2 32 1] | |
[ 2 33 0] | |
[ 3 0 32] | |
[ 3 1 31] | |
[ 3 2 30] | |
[ 3 3 29] | |
[ 3 4 28] | |
[ 3 5 27] | |
[ 3 6 26] | |
[ 3 7 25] | |
[ 3 8 24] | |
[ 3 9 23] | |
[ 3 10 22] | |
[ 3 11 21] | |
[ 3 12 20] | |
[ 3 13 19] | |
[ 3 14 18] | |
[ 3 15 17] | |
[ 3 16 16] | |
[ 3 17 15] | |
[ 3 18 14] | |
[ 3 19 13] | |
[ 3 20 12] | |
[ 3 21 11] | |
[ 3 22 10] | |
[ 3 23 9] | |
[ 3 24 8] | |
[ 3 25 7] | |
[ 3 26 6] | |
[ 3 27 5] | |
[ 3 28 4] | |
[ 3 29 3] | |
[ 3 30 2] | |
[ 3 31 1] | |
[ 3 32 0] | |
[ 4 0 31] | |
[ 4 1 30] | |
[ 4 2 29] | |
[ 4 3 28] | |
[ 4 4 27] | |
[ 4 5 26] | |
[ 4 6 25] | |
[ 4 7 24] | |
[ 4 8 23] | |
[ 4 9 22] | |
[ 4 10 21] | |
[ 4 11 20] | |
[ 4 12 19] | |
[ 4 13 18] | |
[ 4 14 17] | |
[ 4 15 16] | |
[ 4 16 15] | |
[ 4 17 14] | |
[ 4 18 13] | |
[ 4 19 12] | |
[ 4 20 11] | |
[ 4 21 10] | |
[ 4 22 9] | |
[ 4 23 8] | |
[ 4 24 7] | |
[ 4 25 6] | |
[ 4 26 5] | |
[ 4 27 4] | |
[ 4 28 3] | |
[ 4 29 2] | |
[ 4 30 1] | |
[ 4 31 0] | |
[ 5 0 30] | |
[ 5 1 29] | |
[ 5 2 28] | |
[ 5 3 27] | |
[ 5 4 26] | |
[ 5 5 25] | |
[ 5 6 24] | |
[ 5 7 23] | |
[ 5 8 22] | |
[ 5 9 21] | |
[ 5 10 20] | |
[ 5 11 19] | |
[ 5 12 18] | |
[ 5 13 17] | |
[ 5 14 16] | |
[ 5 15 15] | |
[ 5 16 14] | |
[ 5 17 13] | |
[ 5 18 12] | |
[ 5 19 11] | |
[ 5 20 10] | |
[ 5 21 9] | |
[ 5 22 8] | |
[ 5 23 7] | |
[ 5 24 6] | |
[ 5 25 5] | |
[ 5 26 4] | |
[ 5 27 3] | |
[ 5 28 2] | |
[ 5 29 1] | |
[ 5 30 0] | |
[ 6 0 29] | |
[ 6 1 28] | |
[ 6 2 27] | |
[ 6 3 26] | |
[ 6 4 25] | |
[ 6 5 24] | |
[ 6 6 23] | |
[ 6 7 22] | |
[ 6 8 21] | |
[ 6 9 20] | |
[ 6 10 19] | |
[ 6 11 18] | |
[ 6 12 17] | |
[ 6 13 16] | |
[ 6 14 15] | |
[ 6 15 14] | |
[ 6 16 13] | |
[ 6 17 12] | |
[ 6 18 11] | |
[ 6 19 10] | |
[ 6 20 9] | |
[ 6 21 8] | |
[ 6 22 7] | |
[ 6 23 6] | |
[ 6 24 5] | |
[ 6 25 4] | |
[ 6 26 3] | |
[ 6 27 2] | |
[ 6 28 1] | |
[ 6 29 0] | |
[ 7 0 28] | |
[ 7 1 27] | |
[ 7 2 26] | |
[ 7 3 25] | |
[ 7 4 24] | |
[ 7 5 23] | |
[ 7 6 22] | |
[ 7 7 21] | |
[ 7 8 20] | |
[ 7 9 19] | |
[ 7 10 18] | |
[ 7 11 17] | |
[ 7 12 16] | |
[ 7 13 15] | |
[ 7 14 14] | |
[ 7 15 13] | |
[ 7 16 12] | |
[ 7 17 11] | |
[ 7 18 10] | |
[ 7 19 9] | |
[ 7 20 8] | |
[ 7 21 7] | |
[ 7 22 6] | |
[ 7 23 5] | |
[ 7 24 4] | |
[ 7 25 3] | |
[ 7 26 2] | |
[ 7 27 1] | |
[ 7 28 0] | |
[ 8 0 27] | |
[ 8 1 26] | |
[ 8 2 25] | |
[ 8 3 24] | |
[ 8 4 23] | |
[ 8 5 22] | |
[ 8 6 21] | |
[ 8 7 20] | |
[ 8 8 19] | |
[ 8 9 18] | |
[ 8 10 17] | |
[ 8 11 16] | |
[ 8 12 15] | |
[ 8 13 14] | |
[ 8 14 13] | |
[ 8 15 12] | |
[ 8 16 11] | |
[ 8 17 10] | |
[ 8 18 9] | |
[ 8 19 8] | |
[ 8 20 7] | |
[ 8 21 6] | |
[ 8 22 5] | |
[ 8 23 4] | |
[ 8 24 3] | |
[ 8 25 2] | |
[ 8 26 1] | |
[ 8 27 0] | |
[ 9 0 26] | |
[ 9 1 25] | |
[ 9 2 24] | |
[ 9 3 23] | |
[ 9 4 22] | |
[ 9 5 21] | |
[ 9 6 20] | |
[ 9 7 19] | |
[ 9 8 18] | |
[ 9 9 17] | |
[ 9 10 16] | |
[ 9 11 15] | |
[ 9 12 14] | |
[ 9 13 13] | |
[ 9 14 12] | |
[ 9 15 11] | |
[ 9 16 10] | |
[ 9 17 9] | |
[ 9 18 8] | |
[ 9 19 7] | |
[ 9 20 6] | |
[ 9 21 5] | |
[ 9 22 4] | |
[ 9 23 3] | |
[ 9 24 2] | |
[ 9 25 1] | |
[ 9 26 0] | |
[10 0 25] | |
[10 1 24] | |
[10 2 23] | |
[10 3 22] | |
[10 4 21] | |
[10 5 20] | |
[10 6 19] | |
[10 7 18] | |
[10 8 17] | |
[10 9 16] | |
[10 10 15] | |
[10 11 14] | |
[10 12 13] | |
[10 13 12] | |
[10 14 11] | |
[10 15 10] | |
[10 16 9] | |
[10 17 8] | |
[10 18 7] | |
[10 19 6] | |
[10 20 5] | |
[10 21 4] | |
[10 22 3] | |
[10 23 2] | |
[10 24 1] | |
[10 25 0] | |
[11 0 24] | |
[11 1 23] | |
[11 2 22] | |
[11 3 21] | |
[11 4 20] | |
[11 5 19] | |
[11 6 18] | |
[11 7 17] | |
[11 8 16] | |
[11 9 15] | |
[11 10 14] | |
[11 11 13] | |
[11 12 12] | |
[11 13 11] | |
[11 14 10] | |
[11 15 9] | |
[11 16 8] | |
[11 17 7] | |
[11 18 6] | |
[11 19 5] | |
[11 20 4] | |
[11 21 3] | |
[11 22 2] | |
[11 23 1] | |
[11 24 0] | |
[12 0 23] | |
[12 1 22] | |
[12 2 21] | |
[12 3 20] | |
[12 4 19] | |
[12 5 18] | |
[12 6 17] | |
[12 7 16] | |
[12 8 15] | |
[12 9 14] | |
[12 10 13] | |
[12 11 12] | |
[12 12 11] | |
[12 13 10] | |
[12 14 9] | |
[12 15 8] | |
[12 16 7] | |
[12 17 6] | |
[12 18 5] | |
[12 19 4] | |
[12 20 3] | |
[12 21 2] | |
[12 22 1] | |
[12 23 0] | |
[13 0 22] | |
[13 1 21] | |
[13 2 20] | |
[13 3 19] | |
[13 4 18] | |
[13 5 17] | |
[13 6 16] | |
[13 7 15] | |
[13 8 14] | |
[13 9 13] | |
[13 10 12] | |
[13 11 11] | |
[13 12 10] | |
[13 13 9] | |
[13 14 8] | |
[13 15 7] | |
[13 16 6] | |
[13 17 5] | |
[13 18 4] | |
[13 19 3] | |
[13 20 2] | |
[13 21 1] | |
[13 22 0] | |
[14 0 21] | |
[14 1 20] | |
[14 2 19] | |
[14 3 18] | |
[14 4 17] | |
[14 5 16] | |
[14 6 15] | |
[14 7 14] | |
[14 8 13] | |
[14 9 12] | |
[14 10 11] | |
[14 11 10] | |
[14 12 9] | |
[14 13 8] | |
[14 14 7] | |
[14 15 6] | |
[14 16 5] | |
[14 17 4] | |
[14 18 3] | |
[14 19 2] | |
[14 20 1] | |
[14 21 0] | |
[15 0 20] | |
[15 1 19] | |
[15 2 18] | |
[15 3 17] | |
[15 4 16] | |
[15 5 15] | |
[15 6 14] | |
[15 7 13] | |
[15 8 12] | |
[15 9 11] | |
[15 10 10] | |
[15 11 9] | |
[15 12 8] | |
[15 13 7] | |
[15 14 6] | |
[15 15 5] | |
[15 16 4] | |
[15 17 3] | |
[15 18 2] | |
[15 19 1] | |
[15 20 0] | |
[16 0 19] | |
[16 1 18] | |
[16 2 17] | |
[16 3 16] | |
[16 4 15] | |
[16 5 14] | |
[16 6 13] | |
[16 7 12] | |
[16 8 11] | |
[16 9 10] | |
[16 10 9] | |
[16 11 8] | |
[16 12 7] | |
[16 13 6] | |
[16 14 5] | |
[16 15 4] | |
[16 16 3] | |
[16 17 2] | |
[16 18 1] | |
[16 19 0] | |
[17 0 18] | |
[17 1 17] | |
[17 2 16] | |
[17 3 15] | |
[17 4 14] | |
[17 5 13] | |
[17 6 12] | |
[17 7 11] | |
[17 8 10] | |
[17 9 9] | |
[17 10 8] | |
[17 11 7] | |
[17 12 6] | |
[17 13 5] | |
[17 14 4] | |
[17 15 3] | |
[17 16 2] | |
[17 17 1] | |
[17 18 0] | |
[18 0 17] | |
[18 1 16] | |
[18 2 15] | |
[18 3 14] | |
[18 4 13] | |
[18 5 12] | |
[18 6 11] | |
[18 7 10] | |
[18 8 9] | |
[18 9 8] | |
[18 10 7] | |
[18 11 6] | |
[18 12 5] | |
[18 13 4] | |
[18 14 3] | |
[18 15 2] | |
[18 16 1] | |
[18 17 0] | |
[19 0 16] | |
[19 1 15] | |
[19 2 14] | |
[19 3 13] | |
[19 4 12] | |
[19 5 11] | |
[19 6 10] | |
[19 7 9] | |
[19 8 8] | |
[19 9 7] | |
[19 10 6] | |
[19 11 5] | |
[19 12 4] | |
[19 13 3] | |
[19 14 2] | |
[19 15 1] | |
[19 16 0] | |
[20 0 15] | |
[20 1 14] | |
[20 2 13] | |
[20 3 12] | |
[20 4 11] | |
[20 5 10] | |
[20 6 9] | |
[20 7 8] | |
[20 8 7] | |
[20 9 6] | |
[20 10 5] | |
[20 11 4] | |
[20 12 3] | |
[20 13 2] | |
[20 14 1] | |
[20 15 0] | |
[21 0 14] | |
[21 1 13] | |
[21 2 12] | |
[21 3 11] | |
[21 4 10] | |
[21 5 9] | |
[21 6 8] | |
[21 7 7] | |
[21 8 6] | |
[21 9 5] | |
[21 10 4] | |
[21 11 3] | |
[21 12 2] | |
[21 13 1] | |
[21 14 0] | |
[22 0 13] | |
[22 1 12] | |
[22 2 11] | |
[22 3 10] | |
[22 4 9] | |
[22 5 8] | |
[22 6 7] | |
[22 7 6] | |
[22 8 5] | |
[22 9 4] | |
[22 10 3] | |
[22 11 2] | |
[22 12 1] | |
[22 13 0] | |
[23 0 12] | |
[23 1 11] | |
[23 2 10] | |
[23 3 9] | |
[23 4 8] | |
[23 5 7] | |
[23 6 6] | |
[23 7 5] | |
[23 8 4] | |
[23 9 3] | |
[23 10 2] | |
[23 11 1] | |
[23 12 0] | |
[24 0 11] | |
[24 1 10] | |
[24 2 9] | |
[24 3 8] | |
[24 4 7] | |
[24 5 6] | |
[24 6 5] | |
[24 7 4] | |
[24 8 3] | |
[24 9 2] | |
[24 10 1] | |
[24 11 0] | |
[25 0 10] | |
[25 1 9] | |
[25 2 8] | |
[25 3 7] | |
[25 4 6] | |
[25 5 5] | |
[25 6 4] | |
[25 7 3] | |
[25 8 2] | |
[25 9 1] | |
[25 10 0] | |
[26 0 9] | |
[26 1 8] | |
[26 2 7] | |
[26 3 6] | |
[26 4 5] | |
[26 5 4] | |
[26 6 3] | |
[26 7 2] | |
[26 8 1] | |
[26 9 0] | |
[27 0 8] | |
[27 1 7] | |
[27 2 6] | |
[27 3 5] | |
[27 4 4] | |
[27 5 3] | |
[27 6 2] | |
[27 7 1] | |
[27 8 0] | |
[28 0 7] | |
[28 1 6] | |
[28 2 5] | |
[28 3 4] | |
[28 4 3] | |
[28 5 2] | |
[28 6 1] | |
[28 7 0] | |
[29 0 6] | |
[29 1 5] | |
[29 2 4] | |
[29 3 3] | |
[29 4 2] | |
[29 5 1] | |
[29 6 0] | |
[30 0 5] | |
[30 1 4] | |
[30 2 3] | |
[30 3 2] | |
[30 4 1] | |
[30 5 0] | |
[31 0 4] | |
[31 1 3] | |
[31 2 2] | |
[31 3 1] | |
[31 4 0] | |
[32 0 3] | |
[32 1 2] | |
[32 2 1] | |
[32 3 0] | |
[33 0 2] | |
[33 1 1] | |
[33 2 0] | |
[34 0 1] | |
[34 1 0] | |
[35 0 0] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment