自己先写写。可以用hashtable:键名保存生成的随机数,值就是88、8888 然后在创建带有逻辑的随机数,我的想法。没时间帮你搞啊

解决方案 »

  1.   


    int[] seed = new int[1200];
                int count_8888 = 0, count_888 = 0, count_88 = 0, count_8 = 0;
                Random r = new Random();
                
                while (count_8888 < 40)
                {
                    int index = r.Next(0, 1199);
                    if (seed[index] == 0)
                    {
                        seed[index] = 8888;
                        count_8888++;
                    }
                }
                while (count_888 < 60)
                {
                    int index = r.Next(0, 1199);
                    if (seed[index] == 0)
                    {
                        seed[index] = 888;
                        count_888++;
                    }
                }