#include <stdio.h>
int main()
{
// 母集団
int x[] = {44, 100, 63, 99, 25, 47, 96, 42, 70, 100, 25, 80, 98, 49, 9, 46, 92, 65, 57, 50, 55, 95, 33, 7, 5, 56, 3, 25, 85, 96};
int m = sizeof x / sizeof (int);
int i;
double u;
double s2;
double sum;
// 相加平均
sum = 0;
for (i = 0; i < m; i++) {
sum += x[i];
}
u = sum / m;
// 母分散
sum = 0;
for (i = 0; i < m; i++) {
sum += (u - x[i]) * (u - x[i]);
}
s2 = sum / m;
// 出力
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbWFpbigpCnsKCS8vIOavjembhuWbowoJaW50IHhbXSA9IHs0NCwgMTAwLCA2MywgOTksIDI1LCA0NywgOTYsIDQyLCA3MCwgMTAwLCAyNSwgODAsIDk4LCA0OSwgOSwgNDYsIDkyLCA2NSwgNTcsIDUwLCA1NSwgOTUsIDMzLCA3LCA1LCA1NiwgMywgMjUsIDg1LCA5Nn07CglpbnQgbSA9IHNpemVvZiB4IC8gc2l6ZW9mIChpbnQpOwoJaW50IGk7Cglkb3VibGUgdTsKCWRvdWJsZSBzMjsKCWRvdWJsZSBzdW07CgoJLy8g55u45Yqg5bmz5Z2HCglzdW0gPSAwOwoJZm9yIChpID0gMDsgaSA8IG07IGkrKykgewoJCXN1bSArPSB4W2ldOwoJfQoJdSA9IHN1bSAvIG07CgoJLy8g5q+N5YiG5pWjCglzdW0gPSAwOwoJZm9yIChpID0gMDsgaSA8IG07IGkrKykgewoJCXN1bSArPSAodSAtIHhbaV0pICogKHUgLSB4W2ldKTsKCX0KCXMyID0gc3VtIC8gbTsKCgkvLyDlh7rlipsKCXByaW50Zigi5bmz5Z2H5YCkPSVmXG4iLCB1KTsKCXByaW50Zigi5YiG5pWjPSVmXG4iLCBzMik7CgoJcmV0dXJuIDA7Cn0K