URI Online Judge | 2187

Bits Exchanged

Por OBI - Olimpíada Brasileira de Informática 2000 BR Brazil

Timelimit: 1

The Weblads islands form an independent kingdom in the Pacific seas. How is a new kingdom, the society is greatly influenced by computer. The official currency is the Bit; there are notes of B$50,00 B$10,00 B$5,00 to B$1,00. You have been hired to assist in the programming of the ATMs of a large bank of Weblands Islands.

The ATMs of Weblands Islands operate with all types of available notes, keeping a stock of ballots for each value (B$50,00 B$10,00 B$5,00 to B$1,00). Bank customers use ATMs to make withdrawals from a certain integer bits. 

Your task is to write a program that, given the Bit value desired by the client, determine the number of each of the notes required for this total value to minimize the amount of delivered bills. For example, if the customer wishes to withdraw B$50,00, simply deliver a fifty-one Bits. If the client wishes to withdraw B$72,00, it is necessary to deliver a note of B$50,00 B$10,00 two, and two B$1,00.


The input is composed by multiple test sets. Each test set is composed by a single line, that contains a positive integer numberV (0 ≤ V ≤ 10000), that indicates the solicited number by the costumer. The end of the input is indicated by V = 0.


For each test set of the input your program must produce three lines in the output. The first line must contain a test set identifier, in the format “Teste n”, where n it is numbered from 1. In the second line must appear 4 integer I, J, K e L that represent the result found by your program: I indicates the number of ballots B$50,00, J indicates the number of ballots B$10,00, K indicates the number of ballots B$5,00 e L indicates the number of ballots B$1,00. The third line must be left in blank. The spelling shown in Output Example, below, should be followed strictly.

Input Sample Output Sample




Teste 1

0 0 0 1

Teste 2

1 2 0 2