CCF 202012-1 期末预测之安全指数 C语言代码(100分)
问题描述

解题思路
硬解法。
详细代码
#include <stdio.h>
#include <stdlib.h>
int main() {
int n,i, w, score;
int count = 0;
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%d %d", &w, &score);
count += w * score;
}
printf("%d\n", count > 0 ? count: 0);
return 0;
}
