Can you please provide more details about what errors you are encountering with the sample solution? I would assume with that the drawer shouldn’t be able to make change. (Edit, woops, misread .7 as .97 for some reason) (Though, this is not one of the covered test cases)
Okay.
So let it be.
I think the reason is that quarter is not entirely divisible by dimes.
And with all other values it is like this: a larger value contains an integer number of smaller values.