int n;
char c;
scanf(“%d\n%c”,&n,&c);
double a[12][12];
for(int i =0;i<12;i){
for(int j =0;j<12;j)
{
scanf(“%lf”,&a[i][j]);
}
}
double sum;
double average;
for(int j =0;j<12;j++){
sum += a[n][j];
}
if(c=='S') {
printf("%.1lf",sum);
}else if(c=='M'){
printf("%.1lf",sum/12);
}
//sum是求那一行加法,%d\n%c,注意换行不能省略,%lf!=%.lf