Corporation XPTO has developed a catchy new gizmo it expects to sale in large numbers. However its quality assurance department found out a major fault with the new product, named WonderGizmo, which will lead to high complaint and return rates. When exposed to direct moon light it will break! XTPO’s CEO decided to compare the cost of redesigning WonderGizmo with the cost of replacing faulty products, and put you in charge of developing a tool for calculating the amount of units that will have to be fixed or replaced during a period of time after sales begin. This is what you were told: • Sales will begin on a Monday. • WonderGizmo will sell every day of the week from 10:00:00 to 18:00:00. A unit will be sold after every S seconds the store is open. No sales will be conducted after close time. • The Costumer Care Service will have the same schedule but will only be open from Monday to Friday. It will have a staff of E employees, each requiring R seconds to repair a broken WonderGizmo. A unit which would only be fixed after close time, will not be fixed that day, but left untouched to be fixed the following work day. • Every night, F percent of the faulty units in circulation will break. The number of broken units is the floor of this percentage. The following morning the owners of the failed units will join the end of the queue at the Costumer Care Service. They will either leave with a repaired unit or, should they wait for three days without being serviced, a new replacement unit. Replacement will be granted each day at closing time, to every client who is in its third (or more) day of waiting. That very same night these costumers will be using their units. For instance, a client who joins the queue on Monday morning will be given a replacement at Wednesday’s closing time if he is still waiting to be serviced. However, a client who joins the queue on Thursday may have to wait until Monday’s close time. • Costumer Care Service’s fixed units will never again fail. Replaced units are just like the ones sold to costumers, faulty. Input Your program will receive several test cases separated by a blank line. Each of them contains 5 integer numbers, each on a line of its own. The first is the number of seconds between each sale in seconds, S. The second is the numbers of employees repairing WonderGizmos, E. The third is the number of seconds it takes to repair each unit in seconds, R. The fourth is the percentage of faulty units in circulation that will fail each night, F, which will be a number between 1 and 99. The fifth number is the number of selling days for which the results must be known. Output The output for each test case consists of four lines, each with an integer number. The first line will indicate the number of replaced units. The second line will indicate the number of repaired units. The third line will indicate the number of faulty units in circulation. The last line represents the length of the queue at the Costumer Care Service. The program will give the results at shop closing time of the last day. Print a blank line between test cases.
2/2 Sample Input 3600 1 28800 50 2 1800 2 14400 10 8 Sample Output 0 1 12 3 3 16 97 15