Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
I stumpled over this myself. No, you have to try to exchange the 100$ bill with a 50$ bill and a 25$ bill first and if that is False exchange the 100$ bill with 3 25$ bills. If you prorize in that order your code will work.
Oh stupid me, of course you are right.
After the first person buys a ticket the clerk has 1 25 bill
After the second person buys a ticket the clerk has 2 25 bills
After the thirs person buys a ticket the clerk gets one 50 bill, gives back a 25 bill and ends up with 1 25 and 1 50 bill
After the fourth person buys a ticket he gets a 100 and gives back the 50 and the 25 he had, so now the clerk has 1 100 bill
test.assert_equals(tickets([25, 25, 50, 100]), "YES")
1 +25 = 25
2 +25 = 50
3 -25 = 25
4 -75 = -50
There is something wrong with this test case.