{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"Charlie is a driver of Advanced Cargo Movement, Ltd. Charlie drives a lot and so he often buys coffee at coffee vending machines at motorests. Charlie hates change. That is basically the setup of your next task. \r\u003cbr\u003e\r\u003cbr\u003eYour program will be given numbers and types of coins Charlie has and the coffee price. The coffee vending machines accept coins of values 1, 5, 10, and 25 cents. The program should output which coins Charlie has to use paying the coffee so that he uses as many coins as possible. Because Charlie really does not want any change back he wants to pay the price exactly. \r\u003cbr\u003e"}},{"title":"Input","value":{"format":"HTML","content":"Each line of the input contains five integer numbers separated by a single space describing one situation to solve. The first integer on the line P, 1 \u0026lt;\u003d P \u0026lt;\u003d 10 000, is the coffee price in cents. Next four integers, C1, C2, C3, C4, 0 \u0026lt;\u003d Ci \u0026lt;\u003d 10 000, are the numbers of cents, nickels (5 cents), dimes (10 cents), and quarters (25 cents) in Charlie\u0027s valet. The last line of the input contains five zeros and no output should be generated for it. "}},{"title":"Output","value":{"format":"HTML","content":"For each situation, your program should output one line containing the string \"Throw in T1 cents, T2 nickels, T3 dimes, and T4 quarters.\", where T1, T2, T3, T4 are the numbers of coins of appropriate values Charlie should use to pay the coffee while using as many coins as possible. In the case Charlie does not possess enough change to pay the price of the coffee exactly, your program should output \"Charlie cannot buy coffee.\". "}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e12 5 3 1 2\r\n16 0 0 0 1\r\n0 0 0 0 0\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eThrow in 2 cents, 2 nickels, 0 dimes, and 0 quarters.\r\nCharlie cannot buy coffee.\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}