您的位置:首页 > 其它

1061. 判断题(15)

2017-05-13 20:28 211 查看
#include<stdio.h>

int main()
{
int N,M;
int score[100]={0},answer[100]={0},stu_score=0;

scanf("%d%d",&N,&M);
int i=0;
for(i=0; i<M; i++)
scanf("%d",&score[i]);
for(i=0; i<M; i++)
scanf("%d",&answer[i]);
for(i=0; i<N; i++)
{
stu_score = 0;
for(int j=0; j<M; j++)
{
int temp=0;
scanf("%d",&temp);
if(temp==answer[j])
stu_score += score[j];
}
printf("%d\n",stu_score);
}
return 0;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: