# $15.05 of appetizers, please.

Source: https://rickcarlino.com/2013/xkcd287.html
Published: 2013-03-05
Archived: this article may be out of date.

[![This work is licensed under a Creative Commons Attribution-NonCommercial 2.5 License.](http://imgs.xkcd.com/comics/np_complete.png)](http://xkcd.com/287/)

I was recently asked to solve this problem in the programming language of my
choice. Naturally, I chose Ruby. Although I only arrived at a partial solution (
[details are available here](https://github.com/rickcarlino/xkcd-287)), I came
pretty close for 90% of use cases.

Let me know what you think, and feel free to fork the
[Source code on Github.](https://github.com/rickcarlino/xkcd-287).
