文件名称:corsair
- 所属分类:
- 数据结构常用算法
- 资源属性:
- [Windows] [Visual.Net] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 1.98mb
- 下载次数:
- 0次
- 提 供 者:
- Yale*****
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
一伙海盗抢劫一艘商船后,共截获重量不等的N 个金币。海盗试图按重量平分金币,但由于金币
不可分割,所以他们想确定最多可以将这批金币平均分给多少个海盗。请编写程序确定分配方案。
【输入】
输入包含两行:
第一行为一个正整数N,表示金币总数。
第二行包含N 个正整数,表示N 个金币的重量,以空格分隔。
【输出】
只有一行:包含一个正整数,表示输入给定的N 个金币最多可以平均分给多少个海盗。
【限制】
1 <= N <= 60
金币重量的范围为1 到50 -Group of pirates after the robbery of a merchant ship, intercepted a total of N coins of varying weight. The pirates tried to split the gold by weight, but because of the gold indivisible, so they want to make sure these coins can add up to average to the number of pirates. Please write a program to determine the distribution plan. [Input] input contains two lines: the first acts of a positive integer N, the total number of said coins. The second line contains N positive integer, indicating the weight of N coins, separated by spaces. [Output] only a single line: contains a positive integer, said up to enter a given N coins can be divided equally among the number of pirates. [Sample input] [sample output] 4 2 1 2 3 4 [limit] 1 < = N < = 60 gold weight range of 1-50
不可分割,所以他们想确定最多可以将这批金币平均分给多少个海盗。请编写程序确定分配方案。
【输入】
输入包含两行:
第一行为一个正整数N,表示金币总数。
第二行包含N 个正整数,表示N 个金币的重量,以空格分隔。
【输出】
只有一行:包含一个正整数,表示输入给定的N 个金币最多可以平均分给多少个海盗。
【限制】
1 <= N <= 60
金币重量的范围为1 到50 -Group of pirates after the robbery of a merchant ship, intercepted a total of N coins of varying weight. The pirates tried to split the gold by weight, but because of the gold indivisible, so they want to make sure these coins can add up to average to the number of pirates. Please write a program to determine the distribution plan. [Input] input contains two lines: the first acts of a positive integer N, the total number of said coins. The second line contains N positive integer, indicating the weight of N coins, separated by spaces. [Output] only a single line: contains a positive integer, said up to enter a given N coins can be divided equally among the number of pirates. [Sample input] [sample output] 4 2 1 2 3 4 [limit] 1 < = N < = 60 gold weight range of 1-50
(系统自动生成,下载前可以参看下载内容)
下载文件列表
corsair\corsair\corsair.cpp
.......\.......\corsair.vcxproj
.......\.......\corsair.vcxproj.filters
.......\.......\corsair.vcxproj.user
.......\.......\ReadMe.txt
.......\.......\..lease\CL.read.1.tlog
.......\.......\.......\CL.write.1.tlog
.......\.......\.......\corsair.exe.intermediate.manifest
.......\.......\.......\corsair.lastbuildstate
.......\.......\.......\corsair.log
.......\.......\.......\corsair.obj
.......\.......\.......\corsair.pch
.......\.......\.......\link.read.1.tlog
.......\.......\.......\link.write.1.tlog
.......\.......\.......\mt.read.1.tlog
.......\.......\.......\mt.write.1.tlog
.......\.......\.......\stdafx.obj
.......\.......\.......\vc100.pdb
.......\.......\stdafx.cpp
.......\.......\stdafx.h
.......\.......\targetver.h
.......\corsair.sdf
.......\corsair.sln
.......\corsair.suo
.......\ipch\corsair-fa4c5a46\corsair-5513c6f9.ipch
.......\Release\corsair.exe
.......\.......\corsair.pdb
.......\corsair\Release
.......\ipch\corsair-fa4c5a46
.......\corsair
.......\ipch
.......\Release
corsair
.......\.......\corsair.vcxproj
.......\.......\corsair.vcxproj.filters
.......\.......\corsair.vcxproj.user
.......\.......\ReadMe.txt
.......\.......\..lease\CL.read.1.tlog
.......\.......\.......\CL.write.1.tlog
.......\.......\.......\corsair.exe.intermediate.manifest
.......\.......\.......\corsair.lastbuildstate
.......\.......\.......\corsair.log
.......\.......\.......\corsair.obj
.......\.......\.......\corsair.pch
.......\.......\.......\link.read.1.tlog
.......\.......\.......\link.write.1.tlog
.......\.......\.......\mt.read.1.tlog
.......\.......\.......\mt.write.1.tlog
.......\.......\.......\stdafx.obj
.......\.......\.......\vc100.pdb
.......\.......\stdafx.cpp
.......\.......\stdafx.h
.......\.......\targetver.h
.......\corsair.sdf
.......\corsair.sln
.......\corsair.suo
.......\ipch\corsair-fa4c5a46\corsair-5513c6f9.ipch
.......\Release\corsair.exe
.......\.......\corsair.pdb
.......\corsair\Release
.......\ipch\corsair-fa4c5a46
.......\corsair
.......\ipch
.......\Release
corsair