注意:
(1)输入时注意换行符
include[HTML_REMOVED]
using namespace std;
int main()
{
int l;
scanf(“%d\n”,&l);
char c;
scanf(“%c\n”,&c);
double a[12][12];
int i,j;
double s=0;
for(i=0; i<12; i)
{
for(j=0; j<12; j)
{
scanf(“%lf”,&a[i][j]);
if(i==l)
s+=a[i][j];
}
}
if(c=='S')
printf("%.1lf",s);
else
printf("%.1lf",s/12.0);
return 0;
}