答题
代码语言:javascript复制#include<iostream>
#include<cmath>
using namespace std;
int main() {
int n;
double variance=0,average=0;
cin>>n;
double a[n];
for(int i=0;i<n;i ){
cin>>a[i];
average =a[i];
}
average=average/n;
for(int i=0;i<n;i ){
variance =(a[i]-average)*(a[i]-average);
}
variance/=n;
for(int i=0;i<n;i ){
cout<<(a[i]-average)/sqrt(variance)<<endl;
}
}