日期:2014-05-17 浏览次数:21019 次
class Program
{
static void Main(string[] args)
{
string formid = "123456,654789,4569,87954,65446";
string agetid = "123,456,789,741,852";
int task_nums = Regex.Matches(formid, ",").OfType<Match>().Count() + 1;
int aget_nums = Regex.Matches(agetid, ",").OfType<Match>().Count() + 1;
Console.WriteLine("请输入任务量");
int task_auto = Convert.ToInt32(Console.ReadLine());
int peo = GetPer(task_nums, aget_nums, task_auto);
agetid.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries).Take(peo).ToList().ForEach(x => Console.WriteLine(x));
Console.Read();
}
static int GetPer(int task_nums, int aget_nums, int task_auto)
{
int res = 0;
for (int i = 0; i < aget_nums; i++)
{
if ((i + 1) * task_auto <= task_nums)
{
res++;
}
else
{
break;
&