Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

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?

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (10)
As of 2015-11-27 11:02 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (724 votes), past polls