运行几个是正常的,只怕不符合某个指标,如内存、CPUstatic int hash[] = new int[1000001]; //放到 main 里面.................重点是理解这个数组的作用。和这里hash[t]++;
你的程序没有问题