On ITASoftware's website they put up a little puzzle called Nine 9's. I spent the evening solving it and have put up the results
You can download the source here.
Combining nine 9s with any number of the operators +, -, *, /, (, ) , what is the smallest positive integer that cannot be expressed?
1) The answer isn't zero. You can express zero like this: (9 - 9)(9 + 9 + 9 + 9 + 9 + 9 + 9)
Also, zero isn't a positive integer.
2) The answer isn't one. You can express one like this: 9 - (99 - 9)/9 + 9 - 9 + 9 - 9
3) It's not a trick question.
4) Be sure to handle parentheses correctly.
You cannot exponentiate.
You cannot concatenate (for example, put two 9s together to make 99).
The - operator can be used in either its binary or unary form.
Assume base 10.
Git hooks are scripts that are run by Git before or after certain commands. Because the hooks are run locally and not on the server it allo...
A little over a year ago on reddit I saw a picture of a guy sitting on the edge of a rock . Not just any rock, but a clip of a rock that je...
For the 2011 Google Ants AI Challenge rather than doing the typical solution of choosing direction for each ant based upon the shortest pa...
Depending on the definition "code review" can mean a wide variety of things such as formal code review or automated code analysis....
I recently put up a new tool on GitHub called git-hooks . This is a tool to manage project, user and global Git hooks for multiple git repo...
SSD's provide significant improvement in disk IO. How well does that translate over when using Git? A lot. After watching prices dro...
Update: See my more recent blog post Git hooks for a more in depth look at Git hooks. The past few weeks I have started learning Git and ...
All through my programming career I have had a whiteboard, but beyond simply making sure I had one I have never thought much more about it. ...
This weekend I created a little application called git achievements . Similar to the XBox360 Achievements you can unlock all sorts of Achie...
I have created a new application called KAudioCreator. It is a front-end tool for ripping and encoding CD's. I am happy to say that KAud...