Next time you need to buy your friend a birthday present, save money by getting them a deluxe 0-sized Pango board!
Frobenius numbers are solutions to the coin problem. Let be coin denominations; what is the smallest sum of money that cannot be obtained using these coins? More formally, define the Frobenius number as the greatest number that is not a linear combination with . The Frobenius number exists if and only if and . A special case of Frobenius numbers involves the interestingly named McNugget numbers, and there is a well-known formula when given by sometimes known as the Chicken McNugget Theorem.
Background: I introduced SPOJ in a previous post.
ideone is an excellent tool that allows you to write and execute code in many languages, all online. It’s basically a pastebin with added functionality, making it an online mini-IDE. It is based on the SPOJ engine but supports some languages that SPOJ does not.
Background: Sphere Online Judge (SPOJ) is an online judge system accepting a wide variety of programming languages. It’s a great way to test your skills as a programmer, and can be quite addictive if you like a good challenge.
While browsing the SPOJ forums, I did not find a thread detailing how to successfully submit a JAR for the first problem, TEST. So, here’s a quick guide. I’m using Windows, but there should be little difference with other operating systems since everything is done through the command line. I will assume you already have the JDK installed and paths set up such that if you type java, javac, or jar from the command line the appropriate programs will be executed.