#include <stdio.h>
#include <stdlib.h>
int saikoro(void) {
}
int main(void) {
int sum, i;
int frequency[13] = {0};
for (i = 0; i < 100000; i++) {
int die1 = saikoro();
int die2 = saikoro();
sum = die1 + die2;
frequency[sum]++;
}
for (i = 2; i <= 12; i++) {
printf("%d,%d\n", i
, frequency
[i
]); }
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KCmludCBzYWlrb3JvKHZvaWQpIHsKICAgIHJldHVybiAocmFuZCgpICUgNikgKyAxOyAKfQoKaW50IG1haW4odm9pZCkgewogICAgaW50IHN1bSwgaTsKICAgIGludCBmcmVxdWVuY3lbMTNdID0gezB9OyAKCiAgICBmb3IgKGkgPSAwOyBpIDwgMTAwMDAwOyBpKyspIHsKICAgICAgICBpbnQgZGllMSA9IHNhaWtvcm8oKTsgCiAgICAgICAgaW50IGRpZTIgPSBzYWlrb3JvKCk7ICAKICAgICAgICBzdW0gPSBkaWUxICsgZGllMjsgICAgIAogICAgICAgIGZyZXF1ZW5jeVtzdW1dKys7ICAgICAgCiAgICB9CgogICAgcHJpbnRmKCLlkows6aC75bqmXG4iKTsKICAgIGZvciAoaSA9IDI7IGkgPD0gMTI7IGkrKykgewogICAgICAgIHByaW50ZigiJWQsJWRcbiIsIGksIGZyZXF1ZW5jeVtpXSk7IAogICAgfQoKICAgIHJldHVybiAwOwp9Cg==
和,頻度
2,2760
3,5546
4,8388
5,11209
6,13914
7,16786
8,13672
9,11106
10,8439
11,5462
12,2718