RESPONDER UNA PREGUNTA

Si para responder la pregunta, crees necesario enviar un archivo adjunto, puedes hacerlo a traves del correo [email protected]

    Pregunta:  67866 - RESOLVER ESTE EJERCICIO EN JAVA
Autor:  Henrry vczxc
Resolver este ejercicio en java
A factory produces products that are packed in square packets. All packets have the same height h but are of
different sizes 1 x 1, 2 x 2, 3 x 3, 4 x 4, 5 x 5 or 6 x 6. These products are always delivered to customers in
square boxes of height h and of size 6 x 6. In order to reduce transportation cost, it is in the interest of the
factory as well as of the customers to minimize the numbers of boxes necessary to deliver the ordered
products from the factory to the customer. A good algorithm to resolve the problem of determining the
minimum number of boxes necessary to deliver the given products according to a purchase order would save a
lot of money. You are asked to write such a program.

Input
The input file consists of lines of purchase order specifications. Each line specifies one purchase order. Orders
are described by six integers representing the quantity purchased of packets of size in the order 1 x 1 to 6 x 6.
A line containing six zeros indicates the end of the input file.
Output
The output contains one line for each line in the input file. This line specifies the minimum number of boxes
that the purchase order from the corresponding line of the input file needs. There is no line in the output
corresponding to the last null line of the input file.
Sample Input
0 0 4 0 0 1
7 5 1 0 0 0
0 0 0 0 0 0
Sample Output
2
1


Nombre
Apellidos
Correo
Comentarios