fork download
  1. #include <stdlib.h>
  2. #include <stdio.h>
  3. #include <string.h>
  4.  
  5. rnd5(){
  6. return (rand()%5) + 1;
  7. }
  8.  
  9. rnd203(){
  10. int a = 0;
  11. int i;
  12. for(i =0; i<8120; i++) a += rnd5();
  13. return (a % 203) + 1;
  14. }
  15.  
  16. void main()
  17. {
  18. int l[1234];
  19. memset(l,0,1234);
  20.  
  21. int i;
  22. for(i=0;i<20000;i++)
  23. l[rnd203()]++;
  24.  
  25. for(i=1;i<=203;i++)
  26. printf("%d\n", l[i]);
  27. }
Runtime error #stdin #stdout 4.52s 1676KB
stdin
Standard input is empty
stdout
108
101
99
99
102
106
98
83
108
102
94
102
92
110
105
98
113
109
92
106
104
95
117
106
112
85
95
96
96
94
84
101
104
108
99
102
94
104
87
96
86
96
104
105
95
106
92
108
100
85
81
94
89
94
103
112
86
108
105
91
99
121
101
101
85
92
96
115
94
83
96
116
102
111
85
109
98
114
108
93
99
81
75
81
93
96
91
97
99
102
99
86
86
107
103
87
106
91
92
96
103
90
120
105
101
94
99
99
84
107
92
101
97
96
89
109
95
112
82
98
107
117
101
98
96
98
86
98
101
95
109
107
110
82
89
104
112
95
105
89
100
108
93
99
99
98
95
83
90
97
101
104
103
116
85
97
107
114
106
86
106
114
106
86
97
101
82
87
104
100
101
98
111
90
97
92
103
101
88
113
87
85
100
102
107
95
103
97
113
84
95
95
119
94
94
87
101
88
80
115
97
99
101