代码说明:
4-11 最优服务次序问« 问题描述:设有n 个顾客同时等待个顾客的服务次序才能使平总和除以n。« 编程任务:对于给定的n个顾客需要的服务时间,编程计算最优服务次序。« 数据输入:由文件input.txt给出输入数据。第一行是正整数n,表示有n 个顾客。接下来的1 行中,有n个正整数,表示n个顾客需要的服务时间。« 结果输出:将编程计算出的最小平均等待时间输出到文件output.txt。输入文件示例 输出文件示例input.txt output.txt1056 12 1 99 1000 234 33 55 99 812532.-4-11 optimal order asked laquo services; Problem description : n with customers while waiting for customer service so that the order can be divided by the sum of n-ping. Laquo; Programming tasks : to the n needs of its customers time and programming services for calculating optimal order. Laquo; Data input : from the document input.txt given input data. The first line is a positive integer n, n said a customer. Following a visit, n is an integer, n said the needs of the customer service hours. Laquo; Results output : Programming will calculate the average waiting time for the smallest output to a file output.txt. Examples of input document output files example input.txt output.txt1056 12 1 99 1000 23
下载说明:请别用迅雷下载,失败请重下,重下不扣分!