Ad
  • Default User Avatar

    Would you happen to have any solution for dealing with extra large numbers?

    I am finding that the function gets fairly unpredictable if a number with more than 10 digits is passed.
    I thought about adding a rule that would limit the user to less than 11 digits. Then the solution code would
    have to include some sort of logic like:

    if len(str(cents)) > 10:
        cents = int(str(cents)[:10])
    

    But that seems fairly ugly. I tried to do some research to figure out a better way to deal with it but came up
    empty handed. Any advice would be greatly appreciated.

  • Default User Avatar

    Thanks again for the feedback guys really helpful!
    I have added test cases and additional information for your suggestions:

    • More Details/instructions for edge cases (e.g., cents < 1)
    • More explanation for the test case examples in description
    • Explicitly call out what denominations are considered, and their values

    I still have to figure out how to deal with extremely large numbers...

  • Default User Avatar

    Thanks for the feedback and JS translation guys! I will add to the description later today.
    I realized that I missplelled 'Nickels' (was Nickles) so I made that correction. Cheers!