#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define ROLLS 10000
int main(void) {
int frequency[13] = {0};
int die1, die2, sum;
for (int i = 0; i < ROLLS; i++) {
sum = die1 + die2;
frequency[sum]++;
}
// 結果を表示
for (int i = 2; i <= 12; i++) {
printf("%d: %d\n", i
, frequency
[i
]); }
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KI2luY2x1ZGUgPHRpbWUuaD4KCiNkZWZpbmUgUk9MTFMgMTAwMDAgIAoKaW50IG1haW4odm9pZCkgewogICAgaW50IGZyZXF1ZW5jeVsxM10gPSB7MH07ICAKICAgIGludCBkaWUxLCBkaWUyLCBzdW07CgogICAgc3JhbmQodGltZShOVUxMKSk7CiAgICAKICAgIGZvciAoaW50IGkgPSAwOyBpIDwgUk9MTFM7IGkrKykgewogICAgICAgIGRpZTEgPSByYW5kKCkgJSA2ICsgMTsgIAogICAgICAgIGRpZTIgPSByYW5kKCkgJSA2ICsgMTsgIAogICAgICAgIHN1bSA9IGRpZTEgKyBkaWUyOyAgICAgCiAgICAgICAgZnJlcXVlbmN5W3N1bV0rKzsgICAgICAgCiAgICB9CgogICAgLy8g57WQ5p6c44KS6KGo56S6CiAgICBwcmludGYoIuWHuuOBn+ebruOBruWSjOOBrumgu+W6pjpcbiIpOwogICAgZm9yIChpbnQgaSA9IDI7IGkgPD0gMTI7IGkrKykgewogICAgICAgIHByaW50ZigiJWQ6ICVkXG4iLCBpLCBmcmVxdWVuY3lbaV0pOwogICAgfQoKICAgIHJldHVybiAwOwp9