using System.Collections.Generic; using System.Linq; using System.Text; using System; namespace ConsoleApplication1 { class Program { const int TRYCOUNT = 100000; const int MAXMULTIPLE = 100; static Random rnd; static void my_main(int choice_count, int DIVISION) { int value; int i, j, trycount; int[] multiple_ok = new int[MAXMULTIPLE]; for (trycount = 0; trycount < TRYCOUNT; trycount++) { int[] hit_array = new int[DIVISION]; for (i = 0; i < DIVISION; i++) { value = rnd.Next(DIVISION); hit_array[value]++; } value = 0; for (i = 0; i < choice_count + MAXMULTIPLE; i++) { value += hit_array[i]; if (value >= choice_count) { /* i and over i are OK */ for (j = i; j < MAXMULTIPLE; j++) { multiple_ok[j]++; } break; } } } for( j=0; j