Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Golf: Buying with exact change

by Anonymous Monk
on Feb 22, 2005 at 09:18 UTC ( #433293=note: print w/ replies, xml ) Need Help??


in reply to Golf: Buying with exact change

Or, when a $1 denomination is used, all values can be represented. In this case, the solution is undefined, so you can return anything you like (or even loop forever).
Why is the solution undefined if a $1 denomination is used? I'd say there's an obvious answer: 0.


Comment on Re: Golf: Buying with exact change

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://433293]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2015-08-01 00:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (285 votes), past polls