Skip to content

Instantly share code, notes, and snippets.

@samueltangz
Created November 27, 2018 15:01
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save samueltangz/189160dd8119ac20ae14d04500f5f326 to your computer and use it in GitHub Desktop.
# 0 to 9
0 == eval("-~1")
1 == eval("1")
2 == eval("-~1")
3 == eval("3")
4 == eval("-~3")
5 == eval("-~-~3")
6 == eval("~-~-8")
7 == eval("~-8")
8 == eval("8")
9 == eval("9")
# 10
10 == eval("31/3")
# Combining together
# tens unit unused
35 == eval("3 *(31/3) + (-~-~3) + 1/9")
64 == eval("(~-~-8)*(31/3) + (-~3) + 1/9")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment