fork download
#include <stdlib.h>
#include <stdio.h>

#define N 207
int rnd5(){ return (rand()%5) + 1; }
int rndN(){
  int a, i;
  a = 0;
  for(i = 0; i <  N; i++)
    a += rnd5();
  return a % N + 1;
}

int main() {
  static int l[N + 1];
  int i;
  for(i=0;i<100000;i++)
    l[rndN()]++;

  for(i=1;i<=N;i++)
  printf("%d:%d\n", i, l[i]);
  return 0;
}
/* end */
Success #stdin #stdout 0.6s 1676KB
stdin
Standard input is empty
stdout
1:1995
2:1906
3:1874
4:1950
5:1864
6:1886
7:1870
8:1893
9:1911
10:1799
11:1686
12:1670
13:1662
14:1627
15:1544
16:1515
17:1399
18:1369
19:1308
20:1248
21:1268
22:1170
23:1047
24:1053
25:1041
26:872
27:864
28:848
29:777
30:690
31:652
32:560
33:590
34:512
35:505
36:446
37:430
38:347
39:323
40:356
41:288
42:280
43:219
44:207
45:192
46:184
47:147
48:130
49:130
50:111
51:90
52:79
53:85
54:58
55:53
56:48
57:52
58:40
59:42
60:39
61:40
62:28
63:28
64:17
65:15
66:13
67:8
68:9
69:7
70:7
71:4
72:5
73:3
74:6
75:3
76:0
77:3
78:0
79:1
80:0
81:2
82:2
83:2
84:1
85:2
86:0
87:0
88:0
89:0
90:0
91:0
92:0
93:0
94:0
95:0
96:0
97:0
98:0
99:0
100:0
101:0
102:0
103:0
104:0
105:0
106:0
107:0
108:0
109:0
110:0
111:0
112:0
113:0
114:0
115:0
116:0
117:0
118:0
119:0
120:1
121:0
122:0
123:0
124:0
125:1
126:0
127:2
128:1
129:0
130:0
131:2
132:2
133:2
134:2
135:3
136:5
137:9
138:5
139:5
140:9
141:8
142:5
143:12
144:22
145:14
146:14
147:24
148:30
149:25
150:32
151:39
152:44
153:47
154:45
155:83
156:60
157:76
158:99
159:103
160:116
161:140
162:146
163:170
164:211
165:202
166:238
167:236
168:257
169:312
170:325
171:388
172:398
173:449
174:506
175:522
176:529
177:616
178:652
179:682
180:749
181:828
182:863
183:895
184:1013
185:1048
186:1081
187:1145
188:1233
189:1226
190:1351
191:1403
192:1413
193:1471
194:1571
195:1556
196:1595
197:1660
198:1771
199:1765
200:1833
201:1846
202:1871
203:1952
204:1979
205:1933
206:1990
207:2026