-
-
Save goedel-gang/004906bd61279970ba557c7b76c62e64 to your computer and use it in GitHub Desktop.
2019
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
Making the integers from 0-99 using the digits (2, 0, 1, 9) and various | |
mathematical operators, including the binary operators: | |
- addition | |
- subtraction | |
- multiplication | |
- division | |
- exponentiation | |
the unary operators: | |
- factorial | |
- square root | |
- negation | |
The concatenation operator is also allowed, eg to make "90" from 9 and 0. It can | |
be applied to other non-atomic expressions, as in | |
35 = sqrt(9) || ((2 + 1)! - 0!) | |
but this isn't very pretty. | |
This can be extended to also allow unconcatenation - eg | |
73 = (sqrt(9)!)! @@ 0 + 2 - 1 | |
In really desperatee times I may also be persuaded to allow string reversal, eg | |
76 = ~(201 / sqrt(9)) | |
If you think it will be of any great use to you, feel free to use bitwise | |
operators like AND, OR, XOR. | |
You get bonus points for using the digits in the right order (ie an in-order | |
traversal of the leaf nodes of a parse tree of the expression returns 2019). | |
The columns are: initials of finder, "is it pretty?", "does it use nested | |
concatentation?", target number, "are the digits in-order?", solution. | |
Some rows are repeated because I like multiple solutions. | |
Really this whole thing is a bit of an exercise in seeing how far you can get | |
with as few operations as possible. Currently, the important targets are | |
- find in-order solutions for | |
14,15,16,21,25,26 | |
- find non-concatenating solutions for | |
34,35,94,95,97,98 | |
ivd 0* = 2 * 0 * 1 * 9 | |
ivd 1* = 2 * 0 + 1 ^ 9 | |
ivd 2* = 2 + 0 * 1 * 9 | |
ivd 3* = 2 * 0 * 1 + sqrt(9) | |
ivd 4* = 2 * 0 + 1 + sqrt(9) | |
ivd 5* = 2 + 0 * 1 + sqrt(9) | |
ivd 6* = 2 + 0 + 1 + sqrt(9) | |
ivd 7* = -2 + 0 * 1 + 9 | |
ivd 8* = 2 * 0 - 1 + 9 | |
ivd 9* = 2 * 0 * 1 + 9 | |
ivd 10* = 2 * 0 + 1 + 9 | |
ivd 11* = 2 + 0 * 1 + 9 | |
ivd 12* = 2 + 0 + 1 + 9 | |
ivd 13* = 2 + 0! + 1 + 9 | |
ivd p 14 = 12 + sqrt(9) - 0! | |
ivd p 15 = 12 + sqrt(9) + 0 | |
ivd p 16 = 12 + sqrt(9) + 0! | |
ivd 17* = -2 + 0 + 19 | |
ivd 18* = -2 + 0! + 19 | |
ivd 19* = -2 * 0 + 19 | |
ivd 20* = 20 * 1 ^ 9 | |
ivd 21 = 21 + 0 * 9 | |
ivd 22* = 2 + 0! + 19 | |
ivd 23* = 20 + 1 * sqrt(9) | |
ivd 24* = 20 + 1 + sqrt(9) | |
ivd 25 = (sqrt(9) + 1 + 0!) ^ 2 | |
ivd 26 = 2 * (10 + sqrt(9)) | |
ivd 27* = (2 + 0 + 1) ^ sqrt(9) | |
ivd 28* = 20 - 1 + 9 | |
ivd 29* = 20 + 1 * 9 | |
ivd 30* = 20 + 1 + 9 | |
ivd 31 = 29 + 0! + 1 | |
ivd 32 = (10 + sqrt(9)!) * 2 | |
ivd 33 = (12 - 0!) * sqrt(9) | |
ivd c34 = sqrt(9) || (2 + 0! + 1) | |
ivd c35 = sqrt(9) || ((2 + 1)! - 0!) | |
ivd 36* = (2 + 0! + 1) * 9 | |
ivd 37 = 2 * 19 - 0! | |
ivd 38* = 2 * (0 + 19) | |
ivd 39* = 20 + 19 | |
ivd p 40* = 20 * (-1 + sqrt(9)) | |
ivd p * = 2 * (0! + 19) | |
ivd c41 = (sqrt(9) + 2 - 1) || 0! | |
ivd 42 = 21 * (sqrt(9) - 0!) | |
ivd c43 = (sqrt(9) + 1) || (0! + 2) | |
svd c44 = (sqrt(9)! - 2) * (0! || 1) | |
ivd 45* = ((2 + 0!)! - 1) * 9 | |
svd c46 = (2 || sqrt(9)) * (1 + 0!) | |
svd p 47 = 2 * (0! + sqrt(9))! - 1 | |
ivd 48 = 12 * (sqrt(9) + 0!) | |
ivd 49 = (9 - 0! - 1) ^ 2 | |
ivd 50 = 10 * (sqrt(9) + 2) | |
svd c51 = ((sqrt(9) + 2) || 0) + 1 | |
svd c52 = ((sqrt(9) + 2) || 1) + 0! | |
ivd 53 = (2 + 1)! * 9 - 0! | |
ivd 54* = (2 + 0 + 1)! * 9 | |
ivd 55 = (2 + 1)! * 9 + 0! | |
svd c56* = ((2 + 0!)! - 1) || sqrt(9)! | |
ivd 57* = (2 + 0!) * 19 | |
ivd 58 = 29 * (0! + 1) | |
svd c59 = (sqrt(9)! || 1) - 2 + 0 | |
ivd 60* = 20 * 1 * sqrt(9) | |
svd c61 = (sqrt(9)! || 2) - 1 + 0 | |
svd c62 = (sqrt(9)! || 2) - 1 + 0! | |
ivd = 2 ^ (sqrt(9)!) - 0! - 1 | |
ivd 63* = ((2 + 0!)! + 1) * 9 | |
ivd 64 = (9 - 1) ^ 2 + 0 | |
ivd 65 = (9 - 1) ^ 2 + 0! | |
ivd 66 = (21 + 0!) * sqrt(9) | |
ivd p 67* = 201 / sqrt(9) | |
svd c68* = (2 + 0!)! || (-1 + 9) | |
ivd c69* = (2 + 0 + 1)! || 9 | |
ivd p 70 = 210 / sqrt(9) | |
svd p 71 = 9^2 - 10 | |
p = 91 - 20 | |
lge p 72* = (2 + 0! + 1)! * sqrt(9) | |
svd c73* = ((2 + 0!)! + 1) || sqrt(9) | |
svd p 73 = sqrt(9)! * 12 + 0! | |
svd 74 = (sqrt(9)!)! / 10 + 2 | |
svd p 75 = 90 / 1.2 | |
svd c76* = ((2 + 0!)! + 1) || sqrt(9)! | |
= 19 * (0! << 2) | |
ivd pc77 = (1 || 0!) * (9 - 2) | |
svd p 78 = sqrt(9)! * (12 + 0!) | |
svd c78 = ((9 - 1) || 0) - 2 | |
ivd 79 = 9 ^ 2 - 0! - 1 | |
ivd 80 = 9 ^ 2 + 0 - 1 | |
ivd p = 2 ^ sqrt(9) * 10 | |
ivd 81 = 9 ^ 2 + 0 * 1 | |
ivd 82 = 9 ^ 2 + 1 * 0! | |
ivd 83 = 9 ^ 2 + 1 + 0! | |
ivd p 84 = 90 - (1 + 2)! | |
ivd c85 = ~(29 * (0! + 1)) | |
svd p 85 = 91 - (0! + 2)! | |
ivd c86 = (9 - 0!) || (1 + 2)! | |
ivd 87 = 90 - 1 - 2 | |
ivd 88 = 90 - 2 * 1 | |
ivd 89 = 90 - 2 + 1 | |
ivd p 90 = 90 * 1 ^ 2 | |
ivd 91 = 90 - 1 + 2 | |
ivd 92 = 90 + 1 * 2 | |
ivd 93 = 90 + 1 + 2 | |
ivd c94 = 9 || (1 + 0! + 2) | |
ivd c95 = 9 || ((2 + 1)! - 0!) | |
ivd p 96 = 90 + (1 + 2)! | |
ivd p = sqrt(9 * 2 ^ 10) | |
ivd c97 = 9 || ((2 + 1)! + 0!) | |
ivd c98 = 9 || (10 - 2) | |
ivd p 99 = (12 - 0!) * 9 | |
ivd p = 102 - sqrt(9) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment